Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #1188598

    I have added latests news on our home page here but when I click on next page (2, 3) it redirects me to or etc.
    However, I would like to stay in the same element (section) so something like I don’t want to scroll down every time I want to read earlier news.



    Hey cukrmi,
    Sorry for the late reply, the only way I could find to change this is to append your section ID to the pagination links with jQuery.
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    function custom_pagination_script(){
    $(".pagination-wrap.pagination-slider nav.pagination a").each(function() {
       var $this = $(this);       
       var _href = $this.attr("href"); 
       $this.attr("href", _href + '#novinky');
    add_action('wp_footer', 'custom_pagination_script');

    also please ensure that this theme setting is disabled: Enfold Theme Options > Performance > Load jQuery in your footer

    Best regards,


    This works wonderfully.
    Thank you.



    Great, I’m glad that Mike could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,


    You can close this thread now.



    Thanks for letting us know, I’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Blog Posts – pagination (stay in the same element when go to next page)’ is closed to new replies.