• 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

Magazine Pro – Adding pagination to bottom of homepage

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 › Design Tips and Tricks › Magazine Pro – Adding pagination to bottom of homepage

This topic is: resolved

Tagged: front page, Magazine Pro, pagination

  • This topic has 20 replies, 2 voices, and was last updated 9 years ago by Brad Dalton.
Viewing 20 posts - 1 through 20 (of 21 total)
1 2 →
  • Author
    Posts
  • November 26, 2016 at 12:33 am #196644
    khoyen
    Member

    Hi guys,

    I've been struggling to add numeric pagination at the bottom of my blogs homepage.

    I added this code from the following article to my frontpage.php...http://wpsites.net/web-design/add-custom-genesis-loop-with-pagination-after-front-page-widgets/.

    Pagination was added to the page, but it was added to my right rail instead of under the last featured blog post on the homepage.

    Does anyone know what I need to do to fix this?

    Thanks!

    http://www.gentlemanwithin.com
    November 27, 2016 at 3:05 am #196690
    Brad Dalton
    Participant

    I updated the code and tested it so the loop and pagination display after the widgets.


    Tutorials for StudioPress Themes.

    November 29, 2016 at 11:33 pm #196806
    khoyen
    Member

    Thanks! I'll have to try it again this weekend.

    December 3, 2016 at 11:15 pm #196960
    khoyen
    Member

    Thanks again for the fix. It worked, but there seems to be a small issue.

    Link to screenshot for reference: https://www.dropbox.com/s/5wmpuu7fflt03zv/Screen%20Shot%202016-12-04%20at%2012.13.21%20AM.png?dl=0

    December 3, 2016 at 11:20 pm #196961
    khoyen
    Member

    One more thing I noticed...I have 7 blog posts to display on the homepage and then pagination begins...But it seems that after the 7th post all the way at the bottom, instead of displaying the 8th and beyond...it is repeating post 1-7 over again without the feature image displayed. Know what could be causing this?

    Link to screenshot: https://www.dropbox.com/s/ouk9lf1x1721zzk/Gentleman%20Within%20-%20Style%20For%20The%20Conscious%20Man%20%2820161204%29.jpg?dl=0

    December 4, 2016 at 7:08 am #196970
    Brad Dalton
    Participant

    Based on my testing it works fine.


    Tutorials for StudioPress Themes.

    December 4, 2016 at 3:01 pm #197009
    khoyen
    Member

    With a direct copy and paste of the code in this link http://wpsites.net/web-design/add-custom-genesis-loop-with-pagination-after-front-page-widgets/ to the end of my front-page.php, this is the result I'm getting. You can view it live on my site here: http://gentlemanwithin.com/

    December 4, 2016 at 3:08 pm #197010
    Brad Dalton
    Participant

    I don't see any pagination on your front page.


    Tutorials for StudioPress Themes.

    December 4, 2016 at 3:23 pm #197012
    khoyen
    Member

    hmmm...it seems to be appearing like this: https://www.dropbox.com/s/ouk9lf1x1721zzk/Gentleman%20Within%20-%20Style%20For%20The%20Conscious%20Man%20%2820161204%29.jpg?dl=0 in Chrome. But in Safari and Firefox, like you said, there's no pagination at all.

    December 5, 2016 at 5:43 am #197038
    Brad Dalton
    Participant

    Make sure you only use 1 instance of the following:

    remove_action( 'genesis_loop', 'genesis_do_loop' );

    Not sure what is causing the issue because i don't have all your code.


    Tutorials for StudioPress Themes.

    December 6, 2016 at 12:06 am #197106
    khoyen
    Member

    So I only included one instance of that code you mentioned.

    The code I've pasted below is what I have at the end of my front-page.php file. It seems like everything is displaying properly now, except one thing which was an issue from before. When I click over to the "next page >>" all of the articles are repeating themselves...

    /**
    * @author Brad Dalton
    * @example http://wpsites.net/
    * @copyright 2014 WP Sites
    */
    function wpsites_custom_grid_loop() {
    if ( function_exists( 'genesis_grid_loop' ) ) {
    genesis_grid_loop( array(
    'features' => 0,
    'feature_image_size' => 0,
    'feature_content_limit' => 0,
    'grid_image_size' => 0,
    'grid_content_limit' => 250,
    'more' => __( '[Read more]', 'wpsites' ),
    ) );
    } else {
    genesis_standard_loop();
    }
    }
    add_action( 'genesis_after_loop', 'genesis_posts_nav' );
    genesis();

    December 10, 2016 at 2:49 pm #197409
    khoyen
    Member

    Any advice on how to get the articles to not repeat themselves on the next page?

    December 11, 2016 at 8:26 pm #197434
    khoyen
    Member

    For reference, this is what the code looks like on my front-page.php

    <?php
    /**
    * This file adds the Home Page to the Magazine Pro Child Theme.
    *
    * @author StudioPress
    * @package Magazine Pro
    * @subpackage Customizations
    */

    add_action( 'genesis_meta', 'magazine_home_genesis_meta' );
    /**
    * Add widget support for homepage. If no widgets active, display the default loop.
    *
    */
    function magazine_home_genesis_meta() {

    if ( is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-bottom' ) ) {

    // Force content-sidebar layout setting
    add_filter( 'genesis_site_layout', '__genesis_return_content_sidebar' );

    // Add magazine-home body class
    add_filter( 'body_class', 'magazine_body_class' );

    // Remove the default Genesis loop
    remove_action( 'genesis_loop', 'genesis_do_loop' );

    // Add homepage widgets
    add_action( 'genesis_loop', 'magazine_homepage_widgets' );

    }
    }

    function magazine_body_class( $classes ) {

    $classes[] = 'magazine-home';
    return $classes;

    }

    function magazine_homepage_widgets() {

    genesis_widget_area( 'home-top', array(
    'before' => '<div class="home-top widget-area">',
    'after' => '</div>',
    ) );

    genesis_widget_area( 'home-middle', array(
    'before' => '<div class="home-middle widget-area">',
    'after' => '</div>',
    ) );

    genesis_widget_area( 'home-bottom', array(
    'before' => '<div class="home-bottom widget-area">',
    'after' => '</div>',
    ) );

    }

    /**
    Pagination
    */

    function wpsites_custom_grid_loop() {

    if ( function_exists( 'genesis_grid_loop' ) ) {
    genesis_grid_loop( array(
    'features' => 0,
    'feature_image_size' => 0,
    'feature_content_limit' => 0,
    'grid_image_size' => 0,
    'grid_content_limit' => 250,
    'more' => __( '[Read more]', 'wpsites' ),
    ) );
    } else {

    genesis_standard_loop();

    }

    }

    add_action( 'genesis_after_loop', 'genesis_posts_nav' );

    genesis();

    December 11, 2016 at 9:59 pm #197438
    Brad Dalton
    Participant

    Looks like you're missing the action hook for the wpsites_custom_grid_loop function.


    Tutorials for StudioPress Themes.

    December 11, 2016 at 11:02 pm #197439
    khoyen
    Member

    How should I go about applying that function?

    December 11, 2016 at 11:18 pm #197440
    Brad Dalton
    Participant

    Please use the code in the gist i linked to.


    Tutorials for StudioPress Themes.

    December 12, 2016 at 9:53 pm #197501
    khoyen
    Member

    When I add the following piece of code....add_action( 'genesis_loop', 'wpsites_custom_grid_loop', 15 ); ... it reverts to the same issue I was talking about before how the numeric paginations appears twice and the articles are not appearing as they should. If you can take a look at my site, you'll see what I'm talking about.

    http://gentlemanwithin.com/

    December 13, 2016 at 4:39 pm #197547
    khoyen
    Member

    You had mentioned last week that based on your testing, everything worked fine. If you don't mind me asking, can you send me the code that you used?

    March 2, 2017 at 8:19 pm #202385
    khoyen
    Member

    I don't mean to keep beating a dead horse with this one, but I've yet to resolve this pagination issue and it's driving me crazy. I've asked so many developers and no one seems to know any answers.

    Anyone out there who may be able to assist or take a look at what may be going wrong with this?

    Thank you.

    March 4, 2017 at 5:01 pm #202468
    khoyen
    Member

    After reaching out to StudioPress support, they were able to assist me in resolving the issue.

    You can't have any widgets in the HOME area. Took those out and now pagination works.

    Set as resolved.

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 21 total)
1 2 →
  • The forum ‘Design Tips and Tricks’ 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

© 2026 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