90057859fdee5f33e166ab2dcdd1ab2e

Read-MoreWordPress is a powerful platform for blog or website design and yet it is very flexible and easy to understand and customize. Take the simple Read More tag, for example.
Read More maybe something you use in your blog posts or in your home page to display multiple posts or simply to entice your reader to read further. Well, here are three things you may not have known about it:

  • Add it to your theme instead of using the visual editor’s More icon
  • Change the anchor text to something different like “See the Rest” or “Continue to Read”
  • Add an image to the More tag

Add it to your theme

Perhaps adding it to each post is not your cup of tea and you would rather have it done automatically. Well you can! Just add the following to the functions.php file of your theme:

function new_excerpt_more($more) { global $post; return ' Read the full article...'; } add_filter('excerpt_more', 'new_excerpt_more');

However, if your theme is a child theme, the parent theme has its own settings for the more tag. The above will not work. You will have to remove that from the parent first. So you could add the following to your child theme’s functions.php file.

function child_theme_setup() { // override parent theme's 'more' text for excerpts remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ); remove_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' ); } add_action( 'after_setup_theme', 'child_theme_setup' );

One note of caution is the remove parameter must match the add parameter used by the parent theme.

Change the Anchor Text

“Read More” is used so often in most blogs which maybe a good thing since a lot of readers are used to it and know what it means but there maybe occasions where something fresher can be more appropriate or enticing.  You may want to add something like “Hold On, We’re Not Done Yet!”. In that case, search for “the_content” code in your theme’s function.php file and replace what’s there with the new words. From this:

<?php the_content(‘Read More’); ?>

To this:

<?php the_content(‘Hold On, We’re Not done Yet!’); ?>

Be careful you don’t change anything else. You can also style the new words in your style.css file by adding a span tag:

<?php the_content(‘<span class=”moretext”> Hold On, We’re Not Done Yet!</span>’); ?>

Add An Image

The easiest way is to add your image to your theme’s image folder and make sure it is uploaded to the WordPress installation at your host. Then as in the above “Add it to your theme” just add the image after the Read More as follows:

<?php the_content(‘Read more…<img src=”‘ . get_bloginfo(‘template_directory’). ‘/images/your-image.jpg” alt=”read more” title=”Read more…” />’); ?>

Here is what it might look like:

example

And that’s all there is to it.

We love to hear from you if you have a different approach or your thoughts on this topic.

IG Webs – Huntsville Alabama Website Design Services and WordPress Design Expert 

IG Webs, a Huntsville Web design firm is a premier web designer in Huntsville, Alabama known for super client care. You should choose IG Webs if you want personal attention, lower rates and dedication to you. We can respond to you quickly. Client care and service is our top priority and we’re small enough to be able to do just that, yet big enough to meet all your demands. And we do not charge for on page SEO (Search Engine Optimization), we design it in.

See what they say about us. Interested to know how we go about web design? Here’s how. Need more information? Check our FAQ page. Websites are much more than just HTML codes. A website needs to be successful at presenting ideas in an interesting and effective manner with an eye on being found. “Ignorance may be bliss for those who design the website, but that’s seldom the case for those who visit it. ” We work with clients across the nation.  Give us a call today!

Pin It on Pinterest

Shares
Share This
ga('create', 'UA-2963362-1', 'auto'); ga('send', 'pageview');