Making first post show full content?
-
I know there have been posts on this. I am new to wordpress. In playing around, I see that short posts show full content and long posts just say “Read the rest of this entry”. I want to have the option to diaply full content (especially for 1st post). Most forum posts on this topic suggest use of loopcounter. I would rather address the problem right where the logis ic occuring. So I see that my posts are being replaced with the “Read the rest of this entry” text here:
function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages; global $preview; global $pagenow; $output = ''; if ( !empty($post->post_password) ) { // if there's a password if ( stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) { // and it doesn't match the cookie $output = get_the_password_form(); return $output; } } if ( $more_file != '' ) $file = $more_file; else $file = $pagenow; //$_SERVER['PHP_SELF']; if ( $page > count($pages) ) // if the requested page doesn't exist $page = count($pages); // give them the highest numbered page that DOES exist $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 .= ' <a href="'. get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>"; } } 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; }Just don’t see how this code checks the size of the post. Anyway, could really use some help.
thanks,
brian
The topic ‘Making first post show full content?’ is closed to new replies.