-
AuthorPosts
-
June 2, 2017 at 1:20 am #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.
June 5, 2017 at 9:20 pm #804163Hey Briana,
You mean when navigate around with pagination, to go back to top?
Best regards,
BasilisJune 6, 2017 at 2:17 am #804256Hi 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.
June 7, 2017 at 6:20 pm #805218Hi 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,
VictoriaJune 22, 2017 at 7:32 am #811353I’m having this problem too. With Portfolio pagination.
Are there any other solutions?June 22, 2017 at 7:41 am #811358I’m not sure how I get support. I pay for support. my details are in the private section.
June 23, 2017 at 8:06 pm #812296Hi,
function add_custom_script(){
?>
June 24, 2017 at 4:45 am #812374Hi,
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.June 24, 2017 at 11:17 pm #812555Hi,
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,
MikeJune 27, 2017 at 2:12 am #813276Victoria’s solution worked perfectly for me.
Thank you very much!
My issue is resolved but keep it open if other’s still need help.June 27, 2017 at 5:39 am #813296Hi 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,
SarahMay 3, 2018 at 9:51 pm #951111Hello, 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.
May 4, 2018 at 1:06 am #951176Hi,
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,
MikeOctober 1, 2020 at 8:13 pm #1249925Another 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.
October 2, 2020 at 1:28 pm #1250058Hi,
@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,
MikeAugust 1, 2022 at 3:40 am #1360039My 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.
August 1, 2022 at 5:21 am #1360055Hi 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,
NikkoAugust 1, 2022 at 10:37 pm #1360207Can 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.
August 2, 2022 at 12:58 am #1360220Hi Jack Sparrow,
Sure, we will forward your request to our devs. :)
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.