Title: Read More function with Pages
Last modified: August 21, 2016

---

# Read More function with Pages

 *  Resolved [jessicalane](https://wordpress.org/support/users/jessicalane/)
 * (@jessicalane)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/)
 * Hi,
 * I use pages for my website, except for the ‘news’ page, which is a page full 
   of posts- each news item is an individual post.
 * On my homepage i list three posts in a sidebar- so i need to keep them short!
 * The problem is i can’t get the ‘read more’ function to work correctly. this is
   the code i’m using at the moment.
 *     ```
       <h2>Latest NEWS</h2>
       <?php wp_reset_query(); ?>
       <?php query_posts("post_type=post&posts_per_page=3");?>
       <?php if (have_posts()): while (have_posts()): the_post() ; ?>
       <?php the_title();?>
       <?php global $more;$more = 0;?>
       <?php the_content(__('more...')); ?>
       <?php endwhile; endif; ?>
       ```
   
 * _[Please post code & markup between backticks or use the code button. Your posted
   code may now have been permanently damaged by the forum’s parser.]_
 * the titles display correctly, and the content cuts off at the right place (where
   i’ve placed the <!–more–> tag), but instead of just saying ‘more…’ is says ‘Continue
   reading ‘[the title of the news post]’.
 * How do i make it so it cuts off the post and just says ‘more…’, linking to the
   rest of the post.
 * Thank you!

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3662909)
 * what theme are you using?
 * your theme might be using a filter to change the ‘more link’ text…
 *  Thread Starter [jessicalane](https://wordpress.org/support/users/jessicalane/)
 * (@jessicalane)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3662963)
 * thanks for helping! I’m using my own custom theme. it says this concerning the
   content / more function in function.php
 *     ```
       function short_content($post_id, $content, $char_length, $read_more_class, $read_more_text) {
       $count = strlen($content);
       if ($count >= $char_length) {
       $content = substr($content, 0, $char_length);
       $content.= '... <a class="'.$read_more_class.'"
       href="' . get_permalink($post_id) . '">'.$read_more_text.'';
       	}
       echo $content;
       }
       ```
   
 * _[Please post code & markup between backticks or use the code button. Your posted
   code may now have been permanently damaged by the forum’s parser.]_
 * is this where it’s gone wrong?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3662982)
 * >  it says this concerning the content / more function in function.php
 * the snippet does not seem to refer to your problem.
 * >  I’m using my own custom theme
 * in which case you should be very familiar with where what output comes from.
 * this unfortunately makes any support more complicated as the forum’s helpers 
   do not have free access to the code as it would be with themes from [http://wordpress.org/extend/themes/](http://wordpress.org/extend/themes/)
 * you could try and post the **full **code of functions.php – [http://codex.wordpress.org/Forum_Welcome#Posting_Code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)
 *  Thread Starter [jessicalane](https://wordpress.org/support/users/jessicalane/)
 * (@jessicalane)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3662986)
 * This is why i’m having difficulty- i’m new to PHP.
 * I posted that snippet because i thought it was the most relevant- it is the only
   part of function.php that refers to the ‘more’ function- i’m sure of this. Is
   there anywhere else other than functions.php i should check?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3662987)
 * coming back to: “I’m using my own custom theme”
 * this makes it virtually impossible to suggest any actions – as you don’t seem
   to know what is going on in the theme, is there somebody else you might be able
   to contact directly for support with your problem?
 * where is the theme coming from?
    did you buy it or got it custom made?
 *  Thread Starter [jessicalane](https://wordpress.org/support/users/jessicalane/)
 * (@jessicalane)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3662999)
 * I’ve taken over the website and inherited it- i come from a html/css/jquery background
   and am new to wordpress. I’m afraid i can’t even point to to the site as it’s
   on a local server at present. I had just hoped i was making an obvious error 
   that i had overlooked.
 * If you’ve got no other suggestions then i’ll think of something different.
 * Thank you for your help.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3663000)
 * Have you reviewed [Theme Development](http://codex.wordpress.org/Theme_Development)?
 *  Thread Starter [jessicalane](https://wordpress.org/support/users/jessicalane/)
 * (@jessicalane)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3663005)
 * Thank you esmi! but i think i’ve just found the root of the problem- the wordpress
   on this server is an old version- the following code works on version 3.5.1 ,
   but not on the server i was using, which is version 3.3.1 does that sounds like
   it could be the problem??
 * the code i’m using now:
 *     ```
       <h2>Latest NEWS</h2>
       <br/>
       <?php wp_reset_query(); ?>
       <?php query_posts("post_type=post&posts_per_page=3");?>
       <?php if (have_posts()): while (have_posts()): the_post() ; ?>
       <h5><?php the_title();?></h5>
       <?php
       global $more;
       $more = 0;
       the_content("More...");
       ?>
       <?php endwhile; endif; ?>
       ```
   
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3663007)
 * > does that sounds like it could be the problem??
 * Absolutely! A lot has changed since 3.3.1.
 *  Thread Starter [jessicalane](https://wordpress.org/support/users/jessicalane/)
 * (@jessicalane)
 * [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3663012)
 * Brilliant, Thanks a lot 🙂

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

The topic ‘Read More function with Pages’ is closed to new replies.

## Tags

 * [more](https://wordpress.org/support/topic-tag/more/)
 * [pages](https://wordpress.org/support/topic-tag/pages/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 3 participants
 * Last reply from: [jessicalane](https://wordpress.org/support/users/jessicalane/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/read-more-function-with-pages/#post-3663012)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
