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

Community Forums Forums Design Tips and Tricks Consistency across Home.php featured post displays and categories / page 2 etc

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  MM 1 year, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25735

    MM
    Participant
    Post count: 128

    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!

     

    #25766

    burridge
    Participant
    Post count: 2

    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.

    #25828

    MM
    Participant
    Post count: 128

    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”>’,
    ) );

    }

    #28506

    MM
    Participant
    Post count: 128

    ANSWER:

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

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.