WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Read More with title in bold (11 posts)

  1. hugehawk
    Member
    Posted 7 years ago #

    Hi,

    I use the read more feature for the longer posts on my blog. I figured out how to have it show the post title but I am stumped on how to make the whole line bold.

    Here is the code I am using:

    <?php the_content("Continue reading " . the_title('', '', false)); ?>

    I can make the Continue Reading part (in quotes) bold but I have not figured out how to make the whole line (including the title) bold. I've searched all over these forums and google but haven't found anything.

    I'm sure it's something easy but I'm new to this. Thanks in advance for any help you can provide.

  2. resiny
    Member
    Posted 7 years ago #

    try:

    <p style="font-weight: bold;"><?php the_content("Continue reading " . the_title('', '', false)); ?>

  3. moshu
    Member
    Posted 7 years ago #

    Probably not, resiny.
    That would put the whole content, i.e. the whole post in bold, and I don't think that's what the OP wants.

  4. resiny
    Member
    Posted 7 years ago #

    ah. would this do it?

    the closing tag got cut out

  5. hugehawk
    Member
    Posted 7 years ago #

    Unfortunately that bolds the whole post. Anyone have any other ideas?

    Thanks

  6. Kafkaesqui

    Posted 7 years ago #

    <?php the_content('<strong>Continue reading ' . the_title('', '', false) . '</strong>'); ?>

  7. resiny
    Member
    Posted 7 years ago #

    <?php the_content('Continue reading ' . the_title('', '', false) . ''); ?>

    That would be it, most likely

  8. resiny
    Member
    Posted 7 years ago #

    hup. the strong tag went and did itself

  9. moshu
    Member
    Posted 7 years ago #

    resiny, when you post code, please read the instructions below the text input area: code in between backticks ` - it usually is on the left top corner of your keyboard.

  10. resiny
    Member
    Posted 7 years ago #

    my bad. I somehow never saw that

  11. hugehawk
    Member
    Posted 7 years ago #

    Thanks, that solved it Resiny!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags