Sunday, June 26, 2011

A Custom Read More in Wordpress

Display A Custom Read More in Wordpress

To display "A Custom Read More" all you need to do is replace your usual the_content template tag with the following code. So when you write a new post, create a new custom field with the key name "custom_more".

$custommore = get_post_meta($post->ID, 'custom_more', true);
if (!$custommore) { $custommore = 'Read More »'; }
the_content($custommore);

No comments:

Post a Comment

I just got my #domain @BigRock. Get upto 25% off with my personalized coupon link Get upto 25% off