Google like double link

This topic contains 3 replies, has 2 voices, and was last updated by

 
Keymaster
3 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17164

    Participant

    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.
    #17169

    Hi!

    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 :)


    #17173

    Participant

    Thanks 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!

    #17191
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.