Community Forums › Forums › Archived Forums › General Discussion › How to remove pagination, when I am using Infinite scroll
Tagged: beautifull, genesis, infinite, jetpack, pagination, pro, remove, scroll
- This topic has 9 replies, 3 voices, and was last updated 10 years, 5 months ago by
Graham.
-
AuthorPosts
-
May 20, 2015 at 6:36 pm #153005
Usce
MemberHi,
I am using Genesis with Beautifull pro child theme, so I mannaged to install Jetpack's infinite scroll, but there is still pagination at the end of all content of the page(when I scroll throught all post that exist on my front page).
I need to remove that pagination, has anybody have an idea.
Thank you very much!
http://dnevnadoza.orgMay 20, 2015 at 8:12 pm #153021Graham
MemberAdd to your functions.php
remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );
My JustGiving page: https://www.justgiving.com/helping-graham-give
May 20, 2015 at 8:14 pm #153022Tom
ParticipantThis snippet in functions.php should do the trick.
//* remove home page navigation add_action( 'genesis_after_entry', 'beautiful_remove_pagination' ); function beautiful_remove_pagination() { if ( is_home() ) { remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' ); } }
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]May 20, 2015 at 9:09 pm #153032Graham
MemberI believe that conditionally removing the action using is_home() will not remove the pagination on category / tag / author / etc. archive views
My JustGiving page: https://www.justgiving.com/helping-graham-give
May 20, 2015 at 10:25 pm #153047Tom
ParticipantHi Graham,
You are quite right. I keyed off the reference to "front page" (and the fact that the site has no categories!)
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]May 21, 2015 at 7:36 am #153094Usce
MemberThank you guys, your post really helped me, I used grahamw code, and it works for me, but in fact i tried using Tom's code beacuse i would really need to move it only from front page but id didn't worked, it says i have syntax error? :/
Thank you very much 😀
May 21, 2015 at 10:53 am #153107Tom
Participant@usce I suspect a copy/paste issue as the code is correct. Try it again? placing it at the bottom of functions.php without disturbing any other code.
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]May 21, 2015 at 11:03 am #153110Graham
MemberIf someone clicks on any of these links from your front page, then using the is_home() conditional would not be sufficient.
http://dnevnadoza.org/author/usce/
http://dnevnadoza.org/category/uncategorized/If you are using infinite scroll sitewide, then you would most likeley need to remove the pagination sitewide
My JustGiving page: https://www.justgiving.com/helping-graham-give
May 22, 2015 at 6:43 am #153246Usce
MemberYeah I just considered my situation, and I removed pagination from whole website that is what was I needed. Thank you both guys for help, I really appreciate.
HAVE A NICE DAY!!!
May 22, 2015 at 3:08 pm #153318Graham
MemberGlad to hear it 🙂
Are you able to mark this topic as resolved?
My JustGiving page: https://www.justgiving.com/helping-graham-give
-
AuthorPosts
- The topic ‘How to remove pagination, when I am using Infinite scroll’ is closed to new replies.