• 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

Custom Blog page with pagination

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 › Custom Blog page with pagination

This topic is: not resolved
  • This topic has 4 replies, 2 voices, and was last updated 9 years, 11 months ago by pxforti.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • July 6, 2015 at 12:40 pm #158533
    webmestre-cgmatane
    Member

    Hello,

    I'm trying to find out how to customize my blog posts (on my /blog page) to get a result like that :
    http://imgur.com/U1KvBKk

    In fact i'm trying to list all my posts (10 posts by page)

    I dont really understand where i should begin, i'm pretty new with genesis i would like some help. should i create a template with a custom loop ?

    thx

    July 6, 2015 at 2:20 pm #158548
    pxforti
    Participant

    Can't see the image for the results you want. do you have a url. Also, do you have a url for your live site?


    writeNowDesign
    WordPress and Ecommerce Website Design

    July 6, 2015 at 3:39 pm #158553
    webmestre-cgmatane
    Member

    sorry

    http://imgur.com/U1KvBKk

    I'm looking for a WP QUERY with pagination that could work on /blog page and with archives and categories

    July 6, 2015 at 5:09 pm #158575
    webmestre-cgmatane
    Member

    I'm trying this code but its not working im kinda lost :

    <?php
    
    //* Template Name: PAGES NOUVELLES (BLOG)
    
    //* The blog page loop logic is located in lib/structure/loops.php
    /** Force full width layout **/
    add_filter ( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
    // Add specific CSS class by filter
    add_filter( 'body_class', 'my_class_names' );
    function my_class_names( $classes ) {
    	// add 'class-name' to the $classes array
    	$classes[] = 'blog';
    	// return the $classes array
    	return $classes;
    }
    
    remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
    add_action( 'genesis_loop', 'custom_do_loop' ); // Add custom loop
     
    function custom_do_loop() {
    global $post;
    
    	// arguments, adjust as needed
    	$args = array(
    		'post_type'      => 'post',
    		'posts_per_page' => 10,
    		'post_status'    => 'publish',
    		'paged'          => get_query_var( 'paged' )
    	);
    
    	global $wp_query;
    	$wp_query = new WP_Query( $args );
    
    	if ( have_posts() ) : 
    		echo '<ul>';
    		while ( have_posts() ) : the_post(); 
    		?>
    			<article id="" itemscope="itemscope" itemtype="http://schema.org/Article">
    		
    			<div class="one-third first">
    				<a href="" itemprop="thumbnailURL"><img src="" alt="" class="" /></a>
    			
    			</div>
    			
    			<div class="two-thirds">
    			<h3><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    				<div class="meta"></div>
    				<div class="resume" itemprop="about"></div>
    				<div class="read-more" propname="url"></div>
    			</div>
    		
    			</article>
    		<?php
    		endwhile;
    		echo '</ul>';
    		do_action( 'genesis_after_endwhile' );
    	endif;
    
    	wp_reset_query();
    ?>
    
    <?php
    }
    genesis();
    
    
    July 7, 2015 at 7:13 am #158652
    pxforti
    Participant

    Hi,

    I think there's an easier way to do it and still use the genisis blog features and settings.

    The trick is to find out how your blog content is being displayed. I used if( is_archive) but you might have to use a different conditional.

    remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); // removed default genesis featured/post image code
    add_action( 'genesis_before_entry_content', 'featured_post_image' ); add your custom featured post image code
    function featured_post_image() {
      if (is_archive( ))	{ ?>
      	<div class="archive_thumb alignleft">
      	<?php
        the_post_thumbnail('thumbnail'); //you can use thumbnail, medium, large or a custom size
        ?>
      	</div>
      	<?php
      		}
      	}

    writeNowDesign
    WordPress and Ecommerce Website Design

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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

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