WordPress.org

Ready to get started?Download WordPress

Forums

Thematic Child Theme - Show excerpts on home page instead of full posts. (4 posts)

  1. DanielleNicole
    Member
    Posted 1 year ago #

    I am using a child theme on the Thematic Framework. I would like to show excerpts on my home page instead of the full posts. I have tried several things, with no luck. Can anyone help me with this please?

    If needed --> http://lifewithliss.com is the website I am working on.

  2. helgatheviking
    Member
    Posted 1 year ago #

    hey danielle,

    i'll be happy to help... but please post your questions in the thematic forums. i don't really keep up w/ the WP forums for thematic.

    http://www.thematictheme.com/forums

    though the answer is already available on the old forums:
    http://themeshaper.com/forums/topic/excerpts-on-home-page#post-10621

    please don't post there either. we're trying to get everyone to thematictheme.com for easier support

  3. DanielleNicole
    Member
    Posted 1 year ago #

    Problem solved. Turns out my entire functions.php file was messed up.

    In case anyone else stumbles upon this thread with a similar problem, here is my solution:

    I was originally using the functions.php from the thematicsamplechildtheme folder, which I could not get any functions to work with. Solution, I just made a new blank functions file and started fresh, pasting my functions codes into the blank file. Of course don't forget to use the opening and closing php tags at the beginning and end of the file.
    Example:

    <?php
    PASTE YOUR FUNCTIONS HERE
    ?>

    So to change my home page to show the excerpts instead of full posts, I add the following code, and my new functions.php now looks like this:

    <?php
    function childtheme_content($content) {
    	if ( is_home () ) {
    		$content= 'excerpt';}
    	return $content;
    }
    add_filter('thematic_content', 'childtheme_content');
    ?>

    Hope this helps anyone else who may have this problem in the future.

  4. Dominor Novus
    Member
    Posted 1 year ago #

    Thanks Helga and Danielle. The above function was exactly what I needed.

    If anyone is looking to go one step further by adding a "read more" link at the end of the excerpt, use the following function:

    function all_excerpts_get_more_link($post_excerpt) {
    
    	return $post_excerpt . '<a href="'. get_permalink($post->ID) . '">' . 'Read More...' . '</a>';
    }
    add_filter('wp_trim_excerpt', 'all_excerpts_get_more_link');

    Source: http://themeshaper.com/forums/topic/read-more-link-in-manual-excerpt#post-12992

    Links to further resources explaining this at source link.

Topic Closed

This topic has been closed to new replies.

About this Topic