Skip to content

Commit

Permalink
fix: add link to saved searches from home
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander committed Sep 4, 2020
1 parent fdf5cf4 commit c626f24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/Controllers/FrontPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion resources/views/partials/content-front-page.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<section class="home__search">
@include('partials.search-form', ['modifier' => 'inverse', 'placeholder' => __('Search resource name, publisher, or topic…', 'coop-library')])
{{-- Future home of saved searches. --}}
<p><a class="link link--inverse" href="{{ $saved_searches }}">{{ __('Saved searches') }}</a></p>
<div class="spacer"></div>
</section>
<section class="home__browse">
<h2>{{ __('Browse by…', 'coop-library') }}</h2>
Expand Down

0 comments on commit c626f24

Please sign in to comment.