Last active
September 8, 2025 06:56
-
-
Save g-maclean/0cf5318346e3f25bf35b38fcdcc4cb28 to your computer and use it in GitHub Desktop.
Property Hive - add view shortlist button to results page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('propertyhive_before_search_results_loop', 'add_view_shortlist_button', 50); | |
| function add_view_shortlist_button() { | |
| if ( isset($_GET['shortlisted']) && $_GET['shortlisted'] == '1' ) { | |
| echo '<div class="view-shortlist-container" style="clear: both;"> | |
| <a href="/search/" class="button view-shortlist-button">Back to Search</a> | |
| </div>'; | |
| } | |
| echo '<div class="view-shortlist-container" style="clear: both;"> | |
| <a href="/search/?shortlisted=1" class="button view-shortlist-button">View Shortlist</a> | |
| </div>'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment