function get_excerpt($post, $numwords = 10) { $string = ''; $url = post_link($post); $string .= '<h2>' . anchor($url, e($post->post_title)) . '</h2>'; $string .= '<p class="pubdate">' . e($post->publication_date) . '</p>'; $string .= '<p>' . e(text_trunk(strip_tags($post->post_content), $numwords)) . '</p>'; $string .= '<p>' . anchor($url, 'Read more ›', array('post_title' => e($post->post_title))) . '</p>'; return $string; }
</div> <div class="col-md-9 text-justify rhu_post_intro"> <h2 > <a class="" href="<?php echo base_url(post_url($post)); ?> "> <?php echo html_entity_decode(text_trunk($post->post_title)); ?> </a> </h2> <p> <?php echo html_entity_decode(text_trunk($post->post_content, 30)); ?> </p> <p> <a href="<?php echo base_url(post_url($post)); ?> ">read more</a> </p> </div> </div> <?php } ?>
<th> </th> </tr> </thead> <tbody> <?php if (count($posts)) { foreach ($posts as $post) { ?> <tr> <td><?php echo $post->post_title; ?> </td> <td><?php echo text_trunk($post->post_content, 5); ?> </td> <td> <?php echo btn_edit('dashboard/posts/edit/' . $post->post_id); ?> | <?php echo btn_delete('dashboard/posts/delete/' . $post->post_id); ?> </td> </tr> <?php } ?>