Community Forums › Forums › Archived Forums › Design Tips and Tricks › Featured Posts Only Showing On First Page
Tagged: Balance, Eleven40, featured posts
- This topic has 6 replies, 2 voices, and was last updated 11 years, 1 month ago by cehwitham.
-
AuthorPosts
-
February 22, 2013 at 5:57 am #22205dave_sParticipant
I'm tinkering about with Balance and Eleven40 theme on my localhost setup.
I've set featured posts to 6 in home.php and 'Number of Posts to Show' is set to 6 in Genesis settings.
I get 6 featured posts on the home page but on all others they are teasers. It's the same on both Balance and Eleven40. If I switch to MetroTheme it's fine.
Any ideas?
Cheers
Dave
February 22, 2013 at 8:29 am #22225cehwithamMemberIs it the category archive pages you're not getting features on?
The code to output the featured items is the following found in home.php of the eleven40 theme.
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'eleven40_grid_loop_helper' );
/** Add support for Genesis Grid Loop */
function eleven40_grid_loop_helper() {
if ( function_exists( 'genesis_grid_loop' ) ) {
genesis_grid_loop( array(
'features' => 1,
'feature_image_size' => 0,
'feature_image_class' => 'alignleft post-image',
'feature_content_limit' => 0,
'grid_image_size' => 'grid-thumbnail',
'grid_image_class' => 'alignnone',
'grid_content_limit' => 250,
'more' => __( '[Continue reading]', 'genesis' ),
) );
} else {
genesis_standard_loop();
}
}To get this layout on the category pages you'd need to duplicate home.php and rename it category.php so that this code runs on category pages and not just on the homepage.
Twitter: cehwitham Web: cehwitham.com
February 22, 2013 at 9:30 am #22237dave_sParticipantNo, at least I don't think so 🙂
The home page is set to show latest posts
When I scroll down to the bottom of the home page and click on previous all the posts on that page are shown as teasers.
The home.php in Balance shows this:
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_grid_loop_helper' );
/** Add support for Genesis Grid Loop **/
function child_grid_loop_helper() {if ( function_exists( 'genesis_grid_loop' ) ) {
genesis_grid_loop( array(
'features' => 6,
'feature_image_size' => 0,
'feature_image_class' => 'align none post-image',
'feature_content_limit' => 0,
'grid_image_size' => 'grid',
'grid_image_class' => 'align none post-image',
'grid_content_limit' => 0,
'more' => __( 'Continue reading...', 'genesis' ),
'posts_per_page' => 6,
) );}
else {
genesis_standard_loop();
}}
February 22, 2013 at 9:38 am #22241dave_sParticipantThe above should read as follows. Couldn't figure out how to set the code tag!!
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_grid_loop_helper' );
/** Add support for Genesis Grid Loop **/
function child_grid_loop_helper() {if ( function_exists( 'genesis_grid_loop' ) ) {
genesis_grid_loop( array(
'features' => 6,
'feature_image_size' => 0,
'feature_image_class' => 'align none post-image',
'feature_content_limit' => 0,
'grid_image_size' => 'grid',
'grid_image_class' => 'align none post-image',
'grid_content_limit' => 0,
'more' => __( 'Continue reading...', 'genesis' ),
'posts_per_page' => 6,
) );}
else {
genesis_standard_loop();
}}
February 22, 2013 at 4:35 pm #22308cehwithamMemberIt sounds like an issue with the paging. Without being able to look at your site, it's difficult to know what's going on.
The following articles might help you out:
http://www.billerickson.net/code/pagination-in-a-custom-query/
http://www.billerickson.net/code/grid-loop-with-features-teasers/
Twitter: cehwitham Web: cehwitham.com
February 26, 2013 at 5:58 pm #23009dave_sParticipantFigured it out... eventually!
Commented out the grid loop function in home.php
February 28, 2013 at 2:59 pm #23352cehwithamMember -
AuthorPosts
- The topic ‘Featured Posts Only Showing On First Page’ is closed to new replies.