• I’m using this code <?php the_content("<br />continue reading " . get_the_title('', '', false)); ?> for my continue reading link. two questions:
    1. the quotes are not showing – how can I fix this?
    2. How can I style the get_the_title() function so that it is not the same color as the rest of the link so it stands out.

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • You’re passing wrong arguments into get_the_title(). It only accept the post ID of the title you want to fetch. If it’s used inside the loop, the ID does not need to be passed into the function.

    What quotes are you referring to?

    To style the title, you’ll need to put the title between html tags. For example:

    <?php the_content('<br />continue reading <span class="more-title">' . get_the_title() . '</span>'); ?>
    .more-title {
    	color: #000;
    }

    Thread Starter ke vinritt

    (@ke-vinritt)

    Thanks for the help Joseph – I had the concatenation wrong. I wanted to put quotes around the title but not the entire link o it would look like this: continue reading “Web Designer Depot Celebrates 2 years with a giveaway”

    So I wanted to get quotes around the actual title and not the continue reading part

    Thread Starter ke vinritt

    (@ke-vinritt)

    Ok – I got this to work <?php the_content('<br />continue reading <span class="title-link">&ldquo;'. get_the_title() .'&rdquo;</span>'); ?>
    Is this correct or should I do something else – I want to make sure that it’s correct even though it works at this point. you can see the result here (look at the second post)

    That’s correct, however, if you want it in a new paragraph, you should remove <br /> and use the following filter:

    add_filter( 'the_content_more_link', 'my_more_link' );
    function my_more_link($link) {
    	return "<p>$link</p>";
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘styleing the more link/ title’ is closed to new replies.