How to have home page display post content?
-
When I write a post, all that shows up on home page is “Read the rest of this entry”. I would like to think that at least the first 100 words or so would show up. I ran the code through a debugger and can see where this occuring. Here it is:
$content = $pages[$page-1];
if ( preg_match(‘/<!–more(.*?)?–>/’, $content, $matches) ) {
$content = explode($matches[0], $content, 2);
if ( !empty($matches[1]) && !empty($more_link_text) )
$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
} else {
$content = array($content);
}
if ( (false !== strpos($post->post_content, ‘<!–noteaser–>’) && ((!$multipage) || ($page==1))) )
$stripteaser = 1;
$teaser = $content[0];
if ( ($more) && ($stripteaser) )
$teaser = ”;
$output .= $teaser;
if ( count($content) > 1 ) {
if ( $more ) {
$output .= ‘<span id=”more-‘.$id.'”></span>’.$content[1];
} else {
$output = balanceTags($output);
if ( ! empty($more_link_text) )
$output .= ‘ $more_link_text“;
}}
if ( $preview ) // preview fix for javascript bug with foreign languages
$output = preg_replace(‘/%u([0-9A-F]{4,4})/e’, “‘&#’.base_convert(‘\1′,16,10).’;'”, $output);return $output;
I am not a coding expert and I don’t really understand how to get my posts showing the first X words…
thanks,
brian
-
Brian
The code you provided above will mean absolutely nothing to most people! I assume that you are using the <more> tag in your posts, what are you putting before the tag?
Where is your blog? Looking at some of your other posts, My guess is that you’re self hosted, not as wp.com. If this is the case you need to be asking over at http://www.wordpress.org as we can only advise about blogs hosted at wordpress.com.
Collin
- The topic ‘How to have home page display post content?’ is closed to new replies.