• 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

Consistency across Home.php featured post displays and categories / page 2 etc

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 › Consistency across Home.php featured post displays and categories / page 2 etc

This topic is: resolved

Tagged: category, Eleven40, featured posts, homepage, next page

  • This topic has 3 replies, 2 voices, and was last updated 10 years ago by MM.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 12, 2013 at 4:05 pm #25735
    MM
    Member

    Hi Anyone

     

    Eleven 40 theme and  mikemetcalfe.co

     

    I’ve customised post previews on home.php as shown here: http://mikemetcalfe.co

     

    But I want previews on category pages eg -  http://mikemetcalfe.co/category/tools-hints-tips/

    and when clicking page 2, 3 etc from the homepage or anywhere  eg.  http://mikemetcalfe.co/page/2/

     

    ... to appear exactly like the home page changes.

     

    I couldn’t see in home.php or functions.php how to customise this? Any advice out there? Thks!

     

    March 12, 2013 at 8:20 pm #25766
    burridge
    Member

    Saw your message on my thread about something similar. I did figure out that you can control your category and tag pages by creating files named category.php and tag.php - not sure why StudioPress themes don't come with these files in the first place. You can basically copy over the code from your home.php file, but in order to get them to run properly, you have to slightly alter your function name.

    So in my original home.php file, for example, I have the line:

    function goinggreen_grid_loop_helper() {

    So in my category.php file, I changed the function to "goinggreen_grid_loop_helper_cat()" and in the tag.php file, I used "tag" instead of "cat", and in both cases, I copied the rest of the code directly from the home.php file, and voilà.

    You'll have to upload these files directly to your wp-content/themes/eleven40/ folder through cpanel or whatever you have - there's no way that I know of to add them through the WordPress dashboard.

    I never did figure out how to transfer the same settings over to page 2 and beyond of my blog archives, though. By setting the grid_image_size and grid_image_class to the same properties as the featured_image_size and featured_image_class in my home.php file, I was able to get the featured image to show up the same way on page 2+, which was good enough for my purposes. But there are still some differences between the home page and page 2+ that I never figured out how to fix. 🙁

    Does this all make sense? Let me know if I can explain something more clearly. I am just figuring this all out as I go.

    March 13, 2013 at 7:22 am #25828
    MM
    Member

    Hi Burridge

     

    Thanks for this! Like you, learning on the fly here. Still unable to fix via your workaround for page 2 displays - any ideas?

     

    Other results to report for Eleven40 theme...

     

    Category / Tag Pages to Mirror Home

    Strangely, no customisation was needed. I duplicated home.php to create category.php and tag.php - and that worked.

    Changing the function as suggested (in Eleven40 at least) led to parse errors.

     

    Blog Content Etc

    The advice didn't change the text content limit. But changing that in Genesis > Theme Settings, to be the same as in Home.php, made this work. I guess that's something to do with the homepage pulling settings from home.php, but the Blog page... pulling settings from Genesis > Theme Settings.

     

    Page 2 Same as Home

    Interestingly,

    http://mikemetcalfe.co/blog/page/2/   - THIS WORKS  (displaying like home)

    http://mikemetcalfe.co/page/2/             - THIS DOESN'T (still showing a grid)

     

    Have tried the following on home.php...

     

    1st - which failed

    My home.php was missing the 3 lines below...

    ‘grid_image_size’ => 600,
    ‘grid_image_class’ => 'alignnone post-image',
    ‘grid_content_limit’ => 145,

    I inserted them, made them mirror feature settings. Still didn't work.

     

    2nd - which failed

    I changed:

    /** Do nothing on page 2 or greater */
    if ( get_query_var( 'paged' ) >= 2 )
    return;

    To:

    /** Do nothing on page 2 or greater */
    if ( get_query_var( 'paged' ) >= 1000 )
    return;

    Thinking it'd only kick in after 1000 archive pages. Didn't work.

     

    3rd - which failed

    I deleted

    <?php
    /** Add the home featured section */
    add_action( 'genesis_before_loop', 'eleven40_home_featured' );
    function eleven40_home_featured() {

    /** Do nothing on page 2 or greater */
    if ( get_query_var( 'paged' ) >= 2 )
    return;

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

    }

    March 17, 2013 at 2:28 am #28506
    MM
    Member

    ANSWER:

    See... http://www.studiopress.community/topic/how-to-remove-genesis-grid-loop-on-page-2/

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

© 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