WordPress.org

Ready to get started?Download WordPress

Forums

Styling Excerpts (5 posts)

  1. Elemee
    Member
    Posted 2 years ago #

    Can anyone please explain how/where one can create class(es) for Excerpts so they may be styled with CSS? I'm hoping to display the excerpts on my category archive pages in a "magazine style". Using "yoko" theme. leselkind.me

  2. Tara
    Member
    Posted 2 years ago #

    codex:
    codex.wordpress.org/Customizing_the_Read_More

    some plugins to look into:

    http://wordpress.org/extend/plugins/custom-excerpts/
    http://wordpress.org/extend/plugins/advanced-excerpt/

  3. Elemee
    Member
    Posted 2 years ago #

    Thanks, t-p. Rather than rely on plugins (I already use Thumbnails for Excerpts) I'm trying to learn how to do this via PHP and CSS. I'm a retired guy with little coding experience, just an insane desire to understand how to make a web site that can display media I've created. I'm trying to understand how the coding works as much as I'm trying to get the site up and functional. I do appreciate your suggestion, and any advice you might have on where I can learn more about how to style content in WP. -Les

  4. nicosFR
    Member
    Posted 2 years ago #

    You could simply put your excerpt into some html tags and apply a CSS class to it.

    Something like that:

    <span class="myExcerptClass"><?php the_excerpt() ?></span>

    And in your CSS stylesheet
    .myExcerptClass { styling goes here }

  5. Elemee
    Member
    Posted 2 years ago #

    Thanks, nicosFR. That seems pretty simple and I used it to make some styling of the excerpt happen. Now I just have to figure out the CSS box model and apply it to the excerpt.

Topic Closed

This topic has been closed to new replies.

About this Topic