Wordpress - Custom “Read More” Links for Your Posts

/ Published in: PHP
Save to your folder(s)

From Web Design Ledger "13 Useful Code Snippets for WordPress Development"

Copy this code and paste it in your HTML
  1. // Edit index.php, replace the_content("Read more"); with the following code
  2. <?php $custommore = get_post_meta($post->ID, 'custom_more', true); ?>
  3. <?php if (!$custommore) { $custommore = 'Read More &raquo;'; } ?>
  4. <?php the_content($custommore); ?>

URL: http://webdesignledger.com/tips/13-useful-code-snippets-for-wordpress-development

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.