• 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

lomaymi

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
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 8, 2016 at 10:19 am in reply to: Author's Posts Loop in author.php page #184582
    lomaymi
    Member

    Just figure it out after many hours of trial and error. Will post my code here so anyone can use as reference:

       
    <!-- AUTHOR BLOG POST LOOP 2 COLUMNS -->
    
    <h2>Post by <?php echo $curauth->first_name; ?></h2>
    <br>
    
    <!-- Set parameters to display in posts loops-->
    
    <?php 
    
    $args1 = array( 
    	'numberposts' => 2, 
    	'offset' => 0,  
    	'author' => $authordata->ID,
    	'post_not_in' => array( $post->ID )
    	);
    	
    	
    $args2 = array( 
    	'numberposts' => 2, 
    	'offset' => 2,  
    	'author' => $authordata->ID,
    	'post_not_in' => array( $post->ID )
    	);	
    	
    // This is for author remaining blog posts 
    $args3 = array( 
    	'offset' => 4,  
    	'author' => $authordata->ID,
    	'post_not_in' => array( $post->ID )
    	);	
    
    ?> 
    
    <div class="author_columns">
    
    <!-- First column loop posts -->
    
    <div class="one-half first">
    
    <?php query_posts('showposts=2'); ?>
    <?php $posts = get_posts($args1); foreach ($posts as $post) : start_wp(); ?>
    <?php static $count1 = 0; if ($count1 == "2") { break; } else { ?>
    
    <a>"&gt;&lt;?php the_post_thumbnail('medium'); ?&gt; </a>
    &lt;h3&gt;<a>" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;</a>&lt;/h3&gt;
    &lt;?php the_excerpt (); ?&gt;
    
    
    &lt;?php $count1++; } ?&gt;
    &lt;?php endforeach; ?&gt;
    
    &lt;/div&gt;
    
    &lt;!--Second column loop posts offset 2--&gt;
    
    &lt;div class="one-half"&gt;
    
    &lt;?php query_posts('showposts=2'); ?&gt;
    &lt;?php $posts = get_posts($args2); foreach ($posts as $post) : start_wp(); ?&gt;
    &lt;?php static $count2 = 0; if ($count2 == "2") { break; } else { ?&gt;
    
    
    <a>"&gt;&lt;?php the_post_thumbnail('medium'); ?&gt; </a>
    &lt;h3&gt;<a>" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;</a>&lt;/h3&gt;
    &lt;?php the_excerpt (); ?&gt;
    
    &lt;?php $count2++; } ?&gt;
    
    &lt;?php endforeach; ?&gt;
    
    &lt;/div&gt;
    
    &lt;/div&gt;
    
    &lt;!--AUTHOR REMAINING BLOG POST LIST AFTER FOURTH ENTRY --&gt;
    
    &lt;ul class="author_post_list"&gt;
    &lt;?php
    
    $myposts = get_posts( $args3 );
    foreach ( $myposts as $post ) : setup_postdata( $post ); ?&gt;
    
    	<li>&lt;h4&gt;<a>"&gt;&lt;?php the_title(); ?&gt;</a>&lt;/h4&gt;</li>
        
    &lt;?php endforeach; 
    wp_reset_postdata();?&gt;
    
    </ul>
    
    

    Here are a couple of resources I found very useful:

    • Code Reference: the_excerpt()
    • Codex: Post Thumbnails
    • Codex: Template Tags/get posts
    • How to Display Related Posts by Same Author in WordPress
    • get_posts - get all posts by author id
    • 6 Ways to Display WordPress Post Content in Multiple Columns

    If you got any questions about my code feel free to reply.

    April 28, 2016 at 12:36 am in reply to: Author's Posts Loop in author.php page #184583
    lomaymi
    Member

    Just figure it out after many hours of trial and error. Will post my code here so anyone can use as reference:

    
    <!-- AUTHOR BLOG POST LOOP 2 COLUMNS -->
    
    <h2>Post by <?php echo $curauth->first_name; ?></h2>
    <br>
    
    <!-- Set parameters to display in posts loops-->
    
    <?php 
    
    $args1 = array( 
    	'numberposts' => 2, 
    	'offset' => 0,  
    	'author' => $authordata->ID,
    	'post_not_in' => array( $post->ID )
    	);
    	
    	
    $args2 = array( 
    	'numberposts' => 2, 
    	'offset' => 2,  
    	'author' => $authordata->ID,
    	'post_not_in' => array( $post->ID )
    	);	
    	
    // This is for author remaining blog posts 
    $args3 = array( 
    	'offset' => 4,  
    	'author' => $authordata->ID,
    	'post_not_in' => array( $post->ID )
    	);	
    
    ?> 
    
    <div class="author_columns">
    
    <!-- First column loop posts -->
    
    <div class="one-half first">
    
    <?php query_posts('showposts=2'); ?>
    <?php $posts = get_posts($args1); foreach ($posts as $post) : start_wp(); ?>
    <?php static $count1 = 0; if ($count1 == "2") { break; } else { ?>
    
    <a href="<?php the_permalink() ?>"><?php the_post_thumbnail('medium'); ?> </a>
    <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <?php the_excerpt (); ?>
    
    <?php $count1++; } ?>
    <?php endforeach; ?>
    
    </div>
    
    <!--Second column loop posts offset 2-->
    
    <div class="one-half">
    
    <?php query_posts('showposts=2'); ?>
    <?php $posts = get_posts($args2); foreach ($posts as $post) : start_wp(); ?>
    <?php static $count2 = 0; if ($count2 == "2") { break; } else { ?>
    
    <a href="<?php the_permalink() ?>"><?php the_post_thumbnail('medium'); ?> </a>
    <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <?php the_excerpt (); ?>
    
    <?php $count2++; } ?>
    
    <?php endforeach; ?>
    
    </div>
    
    </div>
    
    <!--AUTHOR REMAINING BLOG POST LIST AFTER FOURTH ENTRY -->
    
    <ul class="author_post_list">
    <?php
    
    $myposts = get_posts( $args3 );
    foreach ( $myposts as $post ) : setup_postdata( $post ); ?>
    
    	<li><h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4></li>
        
    <?php endforeach; 
    wp_reset_postdata();?>
    
    </ul>
    

    Here are a couple of resources I found very useful (couldn’t post hyperlinks, it appears this marks message as spam. Just do a Google search):

    • Code Reference: the_excerpt()
    • <Codex: Post Thumbnails
    • Codex: Template Tags/get posts
    • How to Display Related Posts by Same Author in WordPress
    • get_posts - get all posts by author id
    • 6 Ways to Display WordPress Post Content in Multiple Columns

    If you got any questions about my code feel free to reply.

    April 14, 2016 at 10:19 pm in reply to: Add background color to left footer widget #183647
    lomaymi
    Member

    Thanks Victor for your help. This put me on the right direction.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)

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