Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Google like double link
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 5 years, 2 months ago.
- AuthorPosts
- March 17, 2018 at 11:47 am #17164
Dear support,
the solution to change the link to the Search Button worked smoothly! Now I’m asking if it’s possible to add a second search link on the bottom of search results as shown on my screenshot (I just edited page source html via Chrome developers’ tools).
Similar Google’s search with “Google Search” and “I’m feeling lucky”.
The first link the same as default (More results take to search page) and the second link take to Google search result page for the filled keyword.
Thanks and best regards
Attachments:
You must be logged in to view attached files.March 19, 2018 at 10:37 am #17169Hi!
I think there are two possible approaches in this case:
1. There are two filters executed right before and after the ‘show more’ link is printed to the page: asp_layout_before_showmore, asp_layout_after_showmore
You can use these hooks to append additional HTML before/after the show more results link, something like:add_action('asp_layout_after_showmore', 'my_asp_layout_after_showmore', 10, 1); function my_asp_layout_after_showmore($search_id) { echo '<span>My HTML code here</span>'; }
2. (not recommended) Directly editing the corresponding template file. In this case, you are looking for the wp-content/plugins/ajax-search-pro/views/results/asp.shortcode.results.php file. This however will not be a permanent change, as upon plugin update this will be overwritten.
In both cases of course you will need additional custom CSS as well, but that depends on the HTML structure you choose. Let me know if you need help with that.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 19, 2018 at 11:35 am #17173Thanks Ernest.
Yesterday I set solution 2 but as you say will not be a permanent solution upon plugin update.
I’m going to try also with the option 1.
I’m going to rate the plugin … it’s real powerful an “smart”.
Thanks again and best regards!
March 20, 2018 at 4:02 pm #17191You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.