• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Pagination resulting in 404 error

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Pagination resulting in 404 error

This topic is: not resolved

Tagged: 404 error, pagination

  • This topic has 5 replies, 2 voices, and was last updated 2 years, 2 months ago by andytc.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • January 3, 2021 at 3:40 am #502464
    nirmalkumar1997
    Participant

    I am using Genesis Sample and for the homepage, I have created home.php

    I have created a custom loop and the code is as below,

    //Creating New Loop
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'kdl_do_custom_loop' );
    
    function kdl_do_custom_loop() {
        global $paged;
        
        $args = array(
           'post_type' => 'tracks',
            'posts_per_page' => 24,
            'paged'          => get_query_var( 'paged' )
           );
        genesis_custom_loop($args);
    }

    The second page is leading to a 404 error. I have tried resaving the permalinks. How can I fix this?

    https://kdramalyrics.com/
    January 3, 2021 at 4:10 am #502465
    andytc
    Participant

    I’m not seeing the 404 , have you fixed it ?

    January 17, 2021 at 3:01 am #502676
    nirmalkumar1997
    Participant

    I am using Rank Math plugin, it is redirecting 404 error pages to the homepage. The issue is still not fixed.

    January 17, 2021 at 11:02 am #502685
    andytc
    Participant

    That’s nothing to do with Genesis, you’ve answered your own query.

    January 19, 2021 at 10:36 pm #502748
    nirmalkumar1997
    Participant

    But the 404 error pagination error is caused by Genesis. Only the redirection is done by Rank Math.

    If the pagination is working properly, there will not be any need for redirection.

    January 20, 2021 at 3:53 am #502752
    andytc
    Participant

    Pagination is working , maybe get in touch with this user who seems to be using the exact same code for 'tracks' and the exact same problem , I problem I don't see , and also that code, if actually used , would create a blank page because it isn't calling the genesis function after removing the loop.

    https://studiopress.community/topic/pagination-not-working-in-genesis-framework/#post-502525

    weird ?

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble