How to Change the Blog Page?


I would like to change the blog page because to shows the whole post when I want it to just show a summary of the blog post on the blog page. Does anyone know how to do this in "Blogs MU"?

  • Patrick

    Hi Jason,

    That's real simple in Blogs-MU. But, first of all, I hope you're using the blogs-mu-child theme so you won't lose your customizations when you update the theme :slight_smile:

    To get the_excerpt and the_post_thumbnail to display everywhere except single posts (where you'll want the whole article I presume), open index.php in your favorite editor (Notepad, Arachnophilia, etc) and scroll to around line 26 where you see the following:

    <?php if( is_date() || is_search() || is_tag() || is_author()) { ?>
    <?php if(function_exists('the_post_thumbnail')) { ?><?php if(get_the_post_thumbnail() != "") { ?><div class="alignleft">
    <?php the_post_thumbnail(); ?></div><?php } } ?>
    <?php the_excerpt();?>
    <?php if (function_exists('wp_ozh_wsa')) { wp_ozh_wsa("336280nocolor"); } ?>
    <?php } else { ?>
    <?php the_content( __('<p>Click here to read more</p>',TEMPLATE_DOMAIN) ); ?>
    <?php wp_link_pages('before=<p>&after=</p>'); ?>
    <?php if (function_exists('wp_ozh_wsa')) { wp_ozh_wsa("336280nocolor"); } ?>
    <?php } ?>

    Replace the entire snippet above with the following:

    <?php if(function_exists('the_post_thumbnail')) { ?><?php if(get_the_post_thumbnail() != "") { ?><div class="alignleft">
    <?php the_post_thumbnail(); ?></div><?php } } ?>
    <?php the_excerpt();?>
    <?php if (function_exists('wp_ozh_wsa')) { wp_ozh_wsa("336280nocolor"); } ?>

    If you need more help, don't hesitate to post again, or start a new thread for a new topic. :slight_smile:

  • aecnu

    Greetings Jason,

    Just checking if this issue was eventually resolved in another thread? Or by yourself separately to us? Or by us over email with you? Or using our live support?

    If so, no need to reply, that's great news.

    If not, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, happy days, glad you got it sorted :slight_smile:

    Thank you for being a WPMU Dev member!

    Cheers, Joe :slight_smile:

  • Mason

    Hiya @maven,

    I'd recommend making modifications such as this within a child theme. This way you can still update the parent theme (blogs mu) without losing your customizations.

    Within your child theme, you'd want to make a copy of page-template-blog.php.

    In this new file search for the following on line 29:
    <?php the_content( __('...Click here to read more',TEMPLATE_DOMAIN) ); ?>

    Simply change the word content to excerpt like so:
    <?php the_excerpt( __('...Click here to read more',TEMPLATE_DOMAIN) ); ?>

    Save the file and you should be set. Let us know if we can assist further.

    If you're not sure about what child themes are, there is one included in the blogs MU download for you. Look in the blogs-mu/themes folder in the download. Just move this theme to wp-content/themes/blogs-mu-child and you're set :slight_smile:

    Hope this helps. Thanks!

  • uc

    Just go to this folder wp-content/themes/ blogs-mu/themes the move blogs-mu-child to

    wp-content/themes/ and copy the edited page-template-blog.php. to the child theme folder.

    Eventually you will have something like this

    Then go to appearance themes, you will see the parent theme and the child the

    Activate the child theme instead of the parent theme.

    Make sure you maintain the folder structure