Scrolling to results

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 4 months ago.

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

    Anonymous

    My search results are not right under the search bar but a little below. I would like to auto scroll to the results when a search is initiated by the user but on pages where I have auto-populate on I do not want the auto scroll to move the page. Is this possible?

    #20315
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I think so, as there is an auto-scroll feature, that you can enable on the back-end here: https://i.imgur.com/RsezsQR.png
    You can enable this on the search instances where you need the auto-scroll, and leave the ones with the auto populate.

    Best,
    Ernest Marcinko

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


    #20341

    Anonymous

    So I am talking about the same search instance.

    I would like to use auto scroll when the user does a search but on a separate page (using same search instance) when I am auto populating I do not want it to use auto scroll.

    In my theme it has been coded that if the page is associated to a category then it gets auto-populated with posts of that category. Maybe you have a snippet that can turn off the auto scroll for these pages?

    The URL given has the search bar without auto populate. If you add /projets/ on the URL you get the same search instance but with auto populate.

    #20343
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    It might be actually possible, I am not sure, it very highly depends on the exact implementation. I have constructed a custom code, that may do the trick. Change the $taxonomy and the $category (either category ID or category slug) variable accordingly. When the post is in the given category, the auto scroll argument is disabled:

    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.