Support » Themes and Templates » When I click "Next" or "Previous", it renders the same page of posts

  • Hello everybody,

    I hope you’re having a wonderful night/day.

    I am building a website of the free Cumulus theme:

    Here is the link to the demo for your convenience:

    According to the demo, if you go to the “Portfolio” page and click “next”, or if using the fancy page number plug-in thingamajig, “2”, “3”, so on and so forth, you should be able to see the next posts after. Any posts that are categorized as “Portfolio” should show up on that page.

    My site is Instead of “Portfolio”, I use “Media” to organize all my music and photos. For whatever reason, when I click page “2”/”Next post”… nothing happens. I’ve tried changing my permalink structure, building a fresh copy of the theme, etc but to no avail.

    Here is the link for your convenience:

    Any help would be wonderful. Thank you for your time!

Viewing 15 replies - 1 through 15 (of 17 total)
  • Stella,

    It sounds like you’re using a plugin to augment the pagination experience? Did you try getting the pagination to work without the plugin? If so, and it did (which I suspect that it did), you can isolate your problem to the plugin, which will help in problem solving. Let us know and we can help narrow it down beyond that.

    Thank you for the quick reply! I also thought that was the issue, so I disabled the fancy pagination. However, it did not work. I also tried a new install of the theme without installing the plug-in whatsoever, but that did not work either.

    Please let me know if you’d like me to disable it so it is easier to diagnose.

    Yes, that will most likely make it easier to identify the issue. Plugin conflicts are pretty normal, especially with free themes that haven’t been rigorously tested against popular plugins. Once you get it working you can start adding plugins one at a time so you can identify if any of your plugins break anything.

    There ya go! Deactivated.

    I’ll also deactivate more plugins tomorrow after work and see if they’re the issue

    I’d recommend stripping down 1 by 1 and seeing if the navigation works, which will let you identify the problem plugin. Let us know how it goes!

    Ahh Grant, it didn’t work. Is it a server-side issue?

    You’ve eliminated the plugin creating the issue since the built in post navigation isn’t working either, so that helps.

    How many posts do you actually have in the media category? It may be duplicating because there aren’t enough posts to actually create duplicate pages of content, and the theme is simply written poorly. Try creating a dozen or so dummy posts (or importing a sample content file) and see if once there are enough posts it actually paginates correctly.

    If not, we’ll have to look at the navi php and see if something in the new wordpress version has broken it. Chances are they’re using a deprecated code snippet.

    I only have 4 pages in the Media category–so only one more post after the 1st page of posts.

    If that is the issue, how can I code it better so that it recognizes any number of posts? Seems inconvenient that I have to infiltrate my category with an x number of blogs every time I want something new up boo hoo

    Thanks so much again Grant

    Nevermind, don’t do that. I’ve got the solution, writing up the code now. 1 minute.

    The problem is in the query at the start of the loop in portfolio.php. Here’s a helpful thread:

    I believe this is what the new query will look like (line 13-17 of portfolio.php), but you’ll have to do some tweaking to see what works:

    $paged = (get_query_var_('paged')) ? get_query_var('paged') : 1;
    global $more;
    $more = 0;

    Thanks! Will keep trying

    Fatal error: Call to undefined function get_query_var_() in /home/djcinn5/public_html/site/wp-content/themes/dj-c/portfolio.php on line 14

    Here’s the function reference in the codex, which uses “$page” instead of “$paged”.

    Mess with it a bit and I think you should be able to figure it out. Post back if you can’t get it to work properly.

    Thanks. Trying now. It’s weird, this theme also has issues with “Read More”… I should have mentioned it in the original post. Are these things connected?

    I’m thinking of building the theme from scratch…

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘When I click "Next" or "Previous", it renders the same page of posts’ is closed to new replies.