Community Forums › Forums › Archived Forums › General Discussion › Pagination Missing for Custom Category Loop Using Page Template
Tagged: categories, category, custom loop, pagination
- This topic has 6 replies, 2 voices, and was last updated 10 years, 4 months ago by Brad Dalton.
-
AuthorPosts
-
May 1, 2014 at 10:07 am #103190anythinggraphicParticipant
Good day 🙂
I need some help! I have searched high and low, near and far, and I cannot figure this out for the life of me.
I have made a normal Page in WP Admin and selected my new page template. This new page template has a custom loop that displays posts from the Art category.
The pagination is missing completely. I have tried every tutorial and code snippet around and it just doesn't like me. I don't understand. Can anyone help me out? Either comment here are on the Gist.
https://gist.github.com/anythinggraphic/3ab48c8b17d90c8c1ff5
Kevin Donnigan – Anything Graphic – Freelance Website Designer & Developer
Anything GraphicMay 1, 2014 at 2:09 pm #103221Brad DaltonParticipantPlease read about Template Hierarchy https://codex.wordpress.org/Template_Hierarchy#Category_display
May 1, 2014 at 7:05 pm #103254anythinggraphicParticipantBrad,
Thank you for the tip! I totally overlooked this. It got me going in the right direction because I now have pagination show up. However, now each page shows the same exact posts as the previous page.
I Googled and searched on these forums for the past hour for similar problems and I tried their solutions, but I am not able to figure it out. I updated my Gist with my attempts to get it working: https://gist.github.com/anythinggraphic/3ab48c8b17d90c8c1ff5.
Again, any help is greatly appreciated. I feel like it's something stupid I'm missing or just haven't had the experience in using some small code snippet...
Thanks in advance!
Kevin Donnigan – Anything Graphic – Freelance Website Designer & Developer
Anything GraphicMay 1, 2014 at 9:01 pm #103272Brad DaltonParticipantKevin
You need to name your file correctly.
If you can't get it working, i would post the code on WordPress Answers as its not specific to StudioPress
May 1, 2014 at 9:50 pm #103278anythinggraphicParticipantI labeled the file correctly after you sent the first reply.
Appreciate the help. I have a developer friend looking into the issue. If we get it, I'll post the fix. It does happen to be a stupid WP issue though...
Kevin Donnigan – Anything Graphic – Freelance Website Designer & Developer
Anything GraphicMay 2, 2014 at 7:08 am #103317anythinggraphicParticipantSo, the issue was a couple of things; Concatenation of the $args and adding lines 23, 24, 25, 93, and 94.
If you're having the same problem, make sure to name your file correctly first. Mine had to be named category-art.php. Then, follow the code in this updated Gist I made: https://gist.github.com/anythinggraphic/3ab48c8b17d90c8c1ff5
Kevin Donnigan – Anything Graphic – Freelance Website Designer & Developer
Anything GraphicMay 2, 2014 at 12:28 pm #103350Brad DaltonParticipant -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.