A Few Things to Keep In Mind When Using the More Tag in WordPress

I just had someone ask me why everything on their front page became bolded when they placed <?php the_content('(more')); ?> in their code to use in conjunction with the more tag in their posts. It took me a while to figure it out but the solution is pretty simple.

The more tag looks like this in the Visual editor:
moretag
You use it to place a break in your post, so that only everything above will be displayed on the page where you placed <?php the_content('(more')); ?>.
If you accidentally place a more tag before some of your other tags are closed though, you can really mess things up.
What do I mean exactly?
If you wanted everything to be bolded or italicized, the opening tags would be at the beginning of you post and the closing tags would be at the end. But your more tag in the middle cuts your post down and the other tags never get closed. So on your front page, you have some opening tags but no closing tags. Hence everything be bolded or italicized.
The only solution I have been able to find is to use this pieces of code instead of the usual <?php the_content('(more')); ?>.

","","","");
echo "

".str_replace($remove, "", get_the_content('(more)'))."

"; ?>

Share this:

Email
Facebook
Twitter
Pinterest
Pocket

Premium Themes for WordPress

Looking for an easy-to-use Premium Theme for WordPress? Check out Themes by bavotasan.com and have your site up and running in no time.

Use this WordPress website builder to build powerful websites in no time for your or your clients.

WordPress Hosting

WP Engine – designed from the ground-up to support and enhance the workflow of web designers.

Bluehost – providing quality web hosting solutions since 1996.

About the author

Picture of Luke Perrie

Luke Perrie