This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Google like double link

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17164
    fa_1976itfa_1976it
    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

    #17169
    Ernest MarcinkoErnest Marcinko
    Keymaster

    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:

    [php]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>’;
    }[/php]

    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.

    #17173
    fa_1976itfa_1976it
    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
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.