Title: Simple &#039;read more&#039; problem, probably a quick answer?!
Last modified: August 20, 2016

---

# Simple 'read more' problem, probably a quick answer?!

 *  [roxette cassette](https://wordpress.org/support/users/roxette-cassette/)
 * (@roxette-cassette)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/simple-read-more-problem-probably-a-quick-answer/)
 * Hi,
 * I have an non wordpress website, and use wordpress for the latest news section
   only. This works great on the latest news page, but I want to pull in the most
   recent 2 excerpts onto the homepage also. All my wordpress files are located 
   on the server under a directory named ‘news’.
 * I can pull the 2 excerpts into the home page using this code
 *     ```
       <?php query_posts('showposts=2'); ?>
       <?php while (have_posts()) : the_post(); ?>
       <h2><?php the_title(); ?></h2>
       <em><?php the_date(); ?></em><br/>
       <?php the_excerpt (); ?>
       <?php endwhile;?>
       ```
   
 * However, I need to either change the ‘read more’ link to the direct URL of my
   latest news page, or remove it altogether and add my own link…
 * I gather I may need to amend the code in the post_template.php file however after
   multiple experiments I just can’t get it to work. Im sure its quite straightforward
   but its becoming very frustrating now.
 * All help greatly appreciated,
 * thankyou!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [wptorgue](https://wordpress.org/support/users/wptorgue/)
 * (@wptorgue)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/simple-read-more-problem-probably-a-quick-answer/#post-2243827)
 * You can filter the excerpt links, like so;
 *     ```
       function new_excerpt_more($more) {
              global $post;
       	return '<a href="'. get_permalink($post->ID) . '">Read the Rest...</a>';
       }
       add_filter('excerpt_more', 'new_excerpt_more');
       ```
   
 * Source: [http://codex.wordpress.org/Function_Reference/the_excerpt](http://codex.wordpress.org/Function_Reference/the_excerpt)
 *  Thread Starter [roxette cassette](https://wordpress.org/support/users/roxette-cassette/)
 * (@roxette-cassette)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/simple-read-more-problem-probably-a-quick-answer/#post-2243857)
 * Thanks, I have read the source but still a bit confused, but how do i amend this
   relevant to my situation?
 * I added this to function.php as stated in the source
 *     ```
       function new_excerpt_more($more) {
              global $post;
       	return '<a href="http://MYURLHERE.com">Read more...</a>';
       }
       add_filter('excerpt_more', 'new_excerpt_more');
       ```
   
 * However I get this error,
 * **Fatal error: Call to undefined function add_filter()**
 * ?
 *  Thread Starter [roxette cassette](https://wordpress.org/support/users/roxette-cassette/)
 * (@roxette-cassette)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/simple-read-more-problem-probably-a-quick-answer/#post-2244008)
 * Does anyone have any advice for me on this? Still trying to work it out 🙁
 * Thankyou!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Simple 'read more' problem, probably a quick answer?!’ is closed to new
replies.

## Tags

 * [excerpt](https://wordpress.org/support/topic-tag/excerpt/)
 * [external website](https://wordpress.org/support/topic-tag/external-website/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [roxette cassette](https://wordpress.org/support/users/roxette-cassette/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/simple-read-more-problem-probably-a-quick-answer/#post-2244008)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
