From c626f242a60ead126489bdf5a6af6a793109f487 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Fri, 4 Sep 2020 10:22:30 -0300 Subject: [PATCH] fix: add link to saved searches from home --- app/Controllers/FrontPage.php | 8 ++++++++ resources/views/partials/content-front-page.blade.php | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Controllers/FrontPage.php b/app/Controllers/FrontPage.php index 064b896..ab1ad8c 100644 --- a/app/Controllers/FrontPage.php +++ b/app/Controllers/FrontPage.php @@ -6,6 +6,14 @@ class FrontPage extends Controller { + public function savedSearches() + { + if (function_exists('pll_get_post')) { + return get_permalink(pll_get_post(get_page_by_title('Saved searches')->ID)); + } + return get_permalink(get_page_by_title('Saved searches')); + } + public function mostViewed() { global $wpdb; diff --git a/resources/views/partials/content-front-page.blade.php b/resources/views/partials/content-front-page.blade.php index 4dda5e9..411a55f 100644 --- a/resources/views/partials/content-front-page.blade.php +++ b/resources/views/partials/content-front-page.blade.php @@ -1,6 +1,7 @@

{{ __('Browse by…', 'coop-library') }}