• Resolved Manuleein

    (@manuleein)


    Hello,

    I’m interested at this theme, but is it possible to use in the blog the excerpt instead the full post?

    I searched for a solution but I don’t know where I have to add the code
    <?php the_excerpt(); ?>

    Is it possible to help me?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Kathryn Presner

    (@zoonini)

    First thing you’ll need to do is make a child theme, so your tweaks won’t be overwritten when updating the theme. Here are some guides in case you haven’t made one before:

    http://codex.wordpress.org/Child_Themes
    http://op111.net/53/
    http://vimeo.com/49770088

    Once your child theme has been set up, copy the file content.php from your parent theme into the child theme folder.

    On line 73, change

    <?php if ( is_search() ) : // Only display Excerpts for Search ?>

    to

    <?php if ( is_search() || is_home() ) : // Only display Excerpts for Search or blog index ?>

    Save the file and upload and activate your child theme.

    Codex reference: http://codex.wordpress.org/Function_Reference/the_excerpt

    You may also need to adjust the style for the Blog index’s “Read More” button in your child theme’s CSS. You can add styles with some CSS like this, adjusting the properties and colours as you like:

    .blog .hentry a.button {
       background-color: #bb00bb;
    }

    Let me know how it goes.

    Thread Starter Manuleein

    (@manuleein)

    Thanks a lot for your help!

    The thing with the Excerpts is working like a charm, but there is no “Read More” button to see :-s
    Have I to add for this button another code?

    Now I will start with the child-thing 😉

    Thread Starter Manuleein

    (@manuleein)

    Sorry, the “Read More” button is to see 🙂

    Moderator Kathryn Presner

    (@zoonini)

    The Read More button is here:

    News ARSENIUM

    As I mentioned above, the button is currently white on white so you’ll probably want to tweak it with custom CSS as I suggested.

    Since excerpts in WordPress can’t parse things like video or audio embeds, there won’t be a “Read More” on posts like this one:

    http://arseniums.com/videos-of-performances/

    To get around this limitation, I would suggest adding manual (aka custom) excerpts on those posts, to force a “Read More” button to appear. You can learn how here:

    https://en.support.wordpress.com/splitting-content/excerpts/

    Thread Starter Manuleein

    (@manuleein)

    I love the style of the “Read More” 🙂 but as far as I saw, it appears after a special numbers of characters in the post/excerpts.

    I also tried to split the post with “More tag”
    https://en.support.wordpress.com/splitting-content/more-tag/ but it doesn’t look nice with the link “Continue reading”

    Is there a way to change the numbers of characters so the “Read More” appears earlier?

    Moderator Kathryn Presner

    (@zoonini)

    You can create a custom excerpt length by adding a function to your child theme. There’s an example in the Codex:

    https://codex.wordpress.org/Function_Reference/the_excerpt#Control_Excerpt_Length_using_Filters

    Be sure to do this in a child theme so your changes aren’t overwritten if you update Harmonic in the future.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Excerpt in Blog’ is closed to new replies.