WordPress.org

Ready to get started?Download WordPress

Forums

the_content font style (6 posts)

  1. zen-cowboy
    Member
    Posted 8 years ago #

    is the_content an h3 heading? i am trying to customize the font and color of the text and i am not sure how to proceed?

    HELP!!!

  2. Austin Matzko
    Member
    Posted 8 years ago #

    You'll want to start by editing the style.css file in your current theme, which is located in /wp-content/themes/[your theme's name]/

    To alter the text overall, you might add something like this, where "color" is the text's color and "font-family" is a list of fonts your want people's browsers to use (if they don't have the first, it goes to the second and so on):

    body {
    color: blue;
    font-family: trebuchet ms, verdana, lucida, arial, helvetica, sans-serif;
    }

  3. zen-cowboy
    Member
    Posted 8 years ago #

    filosofo - i think i miscommunicated what i want to do - i am using <!--more--> to break the post and i want to customize the way it looks in the post; i use the "white as milk" theme and i don't like the way the tag is shown;

    the theme uses the_content so i went to the index file and changed the text but now i want to change the color, and maybe the font; what you are telling me above - isn't that for the body of the post? and if so won't it alter the whole thing rather than just the way <!--more--> looks?

  4. Austin Matzko
    Member
    Posted 8 years ago #

    I see what you mean. Here's what I did on my site. I added the following to my theme's functions.php file:

    function add_more_class($content) {
    return preg_replace('/\#more-(\d+).*"/',"#more-$1\" class=\"more-tag\"",$content);
    }
    add_filter('the_content','add_more_class');

    That inserts the class "more-tag" into the more tag's link:

    <a href="..." class="more-tag"> . . .

    Then you can style the link like so:

    a.more-tag {
    . . .
    }

  5. zen-cowboy
    Member
    Posted 8 years ago #

    great! i'll try that - how about a link to your site for a visual? if OK, of course

  6. Austin Matzko
    Member
    Posted 8 years ago #

    The link is my username.

Topic Closed

This topic has been closed to new replies.

About this Topic