1 Replies - 6510 Views - Last Post: 25 June 2013 - 09:58 PM

#1 DaiToBu  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 93
  • Joined: 17-March 12

Latest Post to be Full Content Article

Posted 11 June 2013 - 07:21 AM

How do I change this to display full article content for my latest posts page?

Was playing with it, but end up only display a few line for the latest posts

function _latest_posts3 ( $options )
	{
	
		
		$element_size = zn_get_size( $options['_sizer'] );
	
	?>
	
							
		<div class="<?php echo $element_size['sizer'];?>">
			<div class=" latest_posts style2">
				<h3 class="m_title"><?php echo $options['lp_title'];?></h3>
				<?php
					if ( !empty( $options['lp_blog_page'] ) ) {
						echo '<a href="'.$options['lp_blog_page'].'" class="viewall">'. __("VIEW ALL",THEMENAME).' -</a>';
					}
				?>
				<ul class="posts">
				<?php
				
					global $post;
				
					// Check what categories were selected..if any 
					if ( isset ( $options['lp_blog_categories'] ) ) {
						$blog_category = implode(',',$options['lp_blog_categories']);
					}
					else {
						$blog_category = '';
					}
					
					// HOW MANY POSTS
					if ( isset ( $options['lp_num_posts'] ) ) {
						$num_posts = $options['lp_num_posts'];
					}
					else {
						$num_posts = '2';
					}
					
					// Start the query
					query_posts( array ( 'posts_per_page' => $num_posts , 'cat' => $blog_category ) );
					
					// GET THE NUMBER OF TOTAL POSTS RETURNED
					global $wp_query;
					
					// Start the loop
					while( have_posts() ){

						the_post(); 
						
						echo '<li class="post">';	

							echo '<div class="details">';
							echo '<span class="date">';
								the_time('d/m/Y');
							echo '</span>';
							echo '<span class="cat">'.__( 'in ', THEMENAME );
								the_category(", ");
							echo '</span>';
							echo '</div>';
							
							// TITLE						
							echo '<h4 class="title"><a href="'.get_permalink().'">'.get_the_title().'</a></h4>';	
							
							// TEXT
							echo '<div class="text">';
								$excerpt = get_the_excerpt();
								$excerpt = strip_shortcodes($excerpt);
								$excerpt = strip_tags($excerpt);
								$the_str = mb_substr($excerpt, 0, 350);
								echo $the_str.'...';
								
							echo '</div>';
							
						echo '</li>';				
					}
					wp_reset_query();
					
				?>

				</ul>
			</div><!-- end // latest posts style 2 -->
		</div>

	<?php
	}



Is This A Good Question/Topic? 0
  • +

Replies To: Latest Post to be Full Content Article

#2 floppyspace  Icon User is offline

  • D.I.C Regular

Reputation: 48
  • View blog
  • Posts: 254
  • Joined: 04-February 10

Re: Latest Post to be Full Content Article

Posted 25 June 2013 - 09:58 PM

Have a look at this line and see if it is the problem

$the_str = mb_substr($excerpt, 0, 350);


It is limited to 350.

Have a look at this.

Hope this helps
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1