Viewing 19 posts - 1 through 19 (of 19 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 6 years, 5 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

    #1360039

    My website shows the blog page 2 as URL https://www.mywebsite.com/blogs/?avia-element-paging=2 instead of https://www.mywebsite.com/blogs/page2. I am using Enfold theme version 5.1.1 which is up to date.

    Is there any way to change this and I want to change it in a way if I update my theme in future, it won’t revert back. Thanks.

    • This reply was modified 2 years, 3 months ago by Jack Sparrow.
    • This reply was modified 2 years, 3 months ago by Jack Sparrow.
    #1360055

    Hi Jack Sparrow,

    Unfortunately, this cannot be changed as this tweak would require the core theme files to be changed.
    This was introduced to the theme to avoid conflict with the normal WordPress pagination.

    Best regards,
    Nikko

    #1360207

    Can you please add this to the suggestion to allow from theme panel options to select something different than WordPress pagination such as “blog/page1, or page-number-1 or anything could be added in the theme options such as resources-page-1 or news-page-1 or articles-page-1 or industry-updates-1 Every website can select their own name or maybe type their own name to show something meaningful in the address bar instead of showing ?avia-element-paging=2. We Coders and Developers know what avia or element or paging or pagination means but what about the end user who is the customer, not the developer or coder?

    Please put this suggestion to add this feature in Enfold Theme options for further customization to make the URL more sense instead of showing theme elements or codes in it. Thanks.

    #1360220

    Hi Jack Sparrow,

    Sure, we will forward your request to our devs. :)

    Best regards,
    Nikko

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