• In the following code example:


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

    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 ?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter rvblog

    (@rvblog)

    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.

    Thanks

    <?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.

    Thread Starter rvblog

    (@rvblog)

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘more link text size’ is closed to new replies.