WordPress.org

Forums

Change excerpt on front page to full content (9 posts)

  1. Selena
    Member
    Posted 3 years ago #

    I am trying to change the front page (blog) from showing an excerpt to showing full post. Can anyone help?
    Thank you.

    http://www.sibylsgarden.com

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    As you are using a commercial theme, you need to seek support from the theme's vendors.

  3. Selena
    Member
    Posted 3 years ago #

    I got this theme from WordPress.org/themes. Do I still have to contact the vendor?

  4. ClaytonJames
    Member
    Posted 3 years ago #

    Open /wp-content/themes/my-life/content.php in a plain text editor.

    On line 44, locate this <?php the_excerpt(); ?> and change it to this

    <?php the_content(); ?>

    That's just a quick guess, but I think that will do it. Please remember to make a backup copy before you edit, just in case something goes wrong and you need to restore the file and try again.

  5. [Edit: Good Evening ClaytonJames! Child themes are our friend. ;) ]

    So you did. Justin's themes are always good reading.

    http://wordpress.org/extend/themes/my-life

    Here's how to pull it off, you just need to create and edit some files.

    Create a child theme of My Life.

    - Make a new empty directory wp-content/themes/my-life-child and copy this style.css into it.

    /*
    Theme Name:My Life Child Theme
    Version: 1.0
    Description: A child theme of Justin Tadlock's My Life theme
    Template: my-life
    */
    
    /* Import layout */
    @import url(../my-life/style.css);

    Now in your dashboard, activate the new theme you just created called "My Life Child Theme" and visit your blog. It should look identical to before and you've just made your own child theme.

    - Copy the file content.php from wp-content/themes/my-life to wp-content/themes/my-life-child and modify one line.

    Change line 44 from

    <?php the_excerpt(); ?>

    to read

    <?php the_content(); ?>

    Save that copy and visit your WordPress site. If all goes well you'll get the full content now and not an excerpt.

    But wait! There's more! The home page shows the features image if you use them. For full content that looks a little odd to me so if you want to hide that, add these lines to your style.css file in wp-content/themes/my-life-child

    .thumbnail {
            display: none;
    }

    That CSS will hide the featured image.

    You could just edit the original content.php file (don't) but if something goes wrong with the child theme, just delete wp-content/themes/my-life-child/content.php and you'll be back to normal.

  6. Selena
    Member
    Posted 3 years ago #

    Thank you so much. I'll try it.

  7. ClaytonJames
    Member
    Posted 3 years ago #

    I sure did miss that one by a mile!!

    http://themehybrid.com/themes/my-life-child

    :-)

  8. Selena
    Member
    Posted 3 years ago #

    Thank, Clayton. The child theme on that page doesn't have a download. So I guess I'll have to build.

  9. ClaytonJames
    Member
    Posted 3 years ago #

    Oh, geeze!!! I am so sorry, I just noticed that the link to the child theme tutorial on that page is dead now as well. I'm sorry I wasted your time on that one. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic