more link text size (5 posts)

  1. rvblog
    Posted 10 years ago #

    In the following code example:

    <div class="postcontent">
    <?php the_content('more »'); ?>

    The the content text - and the word "more" - are the same font size.

    How could you rewrite this to make the font size smaller for the word "more" without changing the font size for the rest of the content text ?


  2. rvblog
    Posted 10 years ago #

    While I think of it,

    Is there also another way to rewrite it so that you can:

    text-align: right

    only the word "more" - so that the word "more " appears at the bottom "right hand side" of a post.


  3. Kafkaesqui

    Posted 10 years ago #

  4. Kafkaesqui

    Posted 10 years ago #

    <?php the_content("<span class="more-link">more</span>"); ?>

    You can then set formatting properties for the class .more-link in your css. The property text-align won't work with the span tag. It will work with a div, but then placing div's inside an anchor tag is considered invalid XHTML.

    Another option is to edit the source directly and place a div (with appropriate class ref) around the more link. For this, look in wp-includes/template-functions-post.php for the function get_the_content(). Of course, make sure to back up source files before editing them.

  5. rvblog
    Posted 10 years ago #

    I think I'll use your first example with the span tag.

    The word "more" will remain on the left hand side of the post.

    Going outside of the theme directory to make that change is something that I would rather not do. That way I won't have to keep track of changes outside the wp-content directory every time I upgrade a nightly.

    Thanks for your help Kaf

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.