Forums

[resolved] No italics in excerpts (6 posts)

  1. PeterPAP
    Member
    Posted 4 months ago #

    In my twentyten theme all titles in my texts are in italics. That is how they are displayed on a single post page (class entry-content, then <p> paragraph and within that ).

    In excerpts however italics do not seem to be rendered. The source code of the page shows obviously different class: entry-summary, then <p> paragraph, but no for a piece of text in italics!

    I would like to have italics both in exerpts (category archive displaying a number of posts) and single post view.

    I tried to find the source of the above in the style sheet .css but cannot.

    Can anyone let me know what needs to be modified to achieve the above?

    regards,
    Peter

  2. alchymyth
    The Sweeper
    Posted 4 months ago #

    excerpts remove all html formatting from the text; so can't selectively have some parts of the excerpts with other formatting.

    possibly try to work with the 'more-tag' and change the code in your child theme of Twenty Ten to show the_content() instead of the_excerpt()

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

    possibly by editing loop.php

    there are answers to this in the forum (try to search for 'show full post in archives twenty ten' or similar)

  3. peredur
    Member
    Posted 4 months ago #

    If the content is being retrieved using the_excerpt(), then most HTML is stripped from the excerpt. See the_excerpt() (first paragraph).

    If that is the problem, you can fix it by replacing the_excerpt() with the_content() and using "more" tags in your posts.

    You'll probably find the code you're after in loop.php in twentyten if memory serves.

    Also be aware that if you are making changes to a default theme like twentyten, you must do it in a Child Theme (if you're not doing so already).

    HTH

    PAE

  4. PeterPAP
    Member
    Posted 4 months ago #

    Many thanks guys, I will definitely try that!
    And come back with the feedback.

  5. PeterPAP
    Member
    Posted 4 months ago #

    just to confirm that this does the trick.
    Exactly what I needed.

    Many thanks

  6. peredur
    Member
    Posted 4 months ago #

    Thanks for the feedback. It helps others who are searching for similar solutions.

    PAE

Reply

You must log in to post.

About this Topic