Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #802828

    I have a blog section on a homepage and I want the user to stay in the same area of the homepage when they click “page 2, page 3” instead of being bumped back to the very top.

    I have tried this solution in the .avia,js that I found in the forums but it doesn’t work:

    jQuery(function() {
    jQuery(“.pagination-slider a”).each(function(){
    var theLink = jQuery(this).attr(“href”);
    jQuery(this).attr(“href”, theLink+”#postings”);
    });
    });

    Can you help me achieve this with a newer solution please. The script above was from a support article from 2014.

    #804163

    Hey Briana,

    You mean when navigate around with pagination, to go back to top?

    Best regards,
    Basilis

    #804256

    Hi Basilis,

    I mean that when they click through the pagination of the blog section (the blog section is halfway down the page layout) the next group of articles load but the user is brought to the top of the page, forcing them to scroll back down to where the blogs are again.

    #805218

    Hi Briana,

    Here is the code you can put in your funtions.php

    
    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    	jQuery("nav.pagination a").each(function(){
    		var theLink = jQuery(this).attr("href");
    		jQuery(this).attr("href", theLink + "#home-blog");
    	});
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #811353

    I’m having this problem too. With Portfolio pagination.
    Are there any other solutions?

    #811358

    I’m not sure how I get support. I pay for support. my details are in the private section.

    #812296

    Hi,
    function add_custom_script(){
    ?>

    #812374

    Hi,
    I’ve put the code that was emailed to me into the functions.php in the child theme folder.
    It doesn’t work.
    Are there any other solutions?
    Thanks for your time.

    #812555

    Hi,
    Perhaps the code didn’t email correctly:

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    	jQuery("nav.pagination a").each(function(){
    		var theLink = jQuery(this).attr("href");
    		jQuery(this).attr("href", theLink + "#home-blog");
    	});
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Best regards,
    Mike

    #813276

    Victoria’s solution worked perfectly for me.
    Thank you very much!
    My issue is resolved but keep it open if other’s still need help.

    #813296

    Hi Briana. That’s great! Please let us know here in the forums if you need help with anything else.
    @webtigerwebsites, do you still need help? Just a reminder: anything you put in Private Content in this thread will also be visible to the creator of the thread. You may open a new topic if you wish. That way, only the staff can see your private data. Thank you!

    Best regards,
    Sarah

    #951111

    Hello, I am having the same issue. I have purchased this theme several times and am currently trying to get the pagination to do the same as everyone else here.

    I gave the above solution a try; put the code inside of my child theme functions file and uploaded it to the test server. I reload the page and it throws a 500 error. So then I remove the code and upload the functions file again, and the website comes back. Can someone please help me resolve this? It is driving me crazy!

    • This reply was modified 3 years, 6 months ago by  Hank.
    #951176

    Hi,
    I went to your site but didn’t see any pagination.
    I have tested the code and it works without errors, perhaps your copy/paste resulted in an error?
    Please open a new thread so we can assist, we will want communicate in the Private Content area, with login info, but as this is not your thread your info will not be private. Thanks.

    Best regards,
    Mike

    #1249925

    Another one who added the code to function.php and the pagination of the blog posts on the home page still reloads the whole page…

    Any direction would be great.

    #1250058

    Hi,
    @mbesh, sorry the code above is 3 years old now, please open a new thread with an admin login and please describe the issue again.
    Since this is not your thread posting your login here will not be private and you will not see anything we write in the Private Content area.
    You can post a link to your new thread here so we can find it easier, thank you for your patience.

    Best regards,
    Mike

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

You must be logged in to reply to this topic.