Help with the Blog module

edited November 2012 in News & Announcements
Hi,

I would like to have the lastest blog post on my home page but don't know how to do that and where to start looking.

Can you help?

Thanks

Comments

  • edited 5:21AM
    Sorry, found it in your WidgiCorp tutorial. Thanks
  • edited 5:21AM
    But do have a problem, I copied your code from the WidgiCorp tutorial but again, I don't see the Read More link on the post:
    <?php $posts = fuel_model('blog_posts', array('find' => 'all', 'limit' => 2, 'order' => 'sticky, date_added desc', 'module' => 'blog')); if (!empty($posts)) : ?> <h2 style="background: #E2CDA2;">The Latest from our Blog</h2> <div style="padding: 5px;"> <ul style="list-style: none;"> <?php foreach($posts as $post) : ?> <li> <h4><a href="<?php echo $post->url; ?>"><?php echo $post->title; ?></a></h4> <?php echo $post->get_excerpt(200, 'Read More'); ?> </li> <?php endforeach; ?> </ul> <?php endif; ?>
    What I see:

    Test 2

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. In et dui quam. Nulla libero tellus, egestas vel hendrerit eu, porttitor a nibh. Suspendisse potenti. Maecenas felis quam, interdum non commodo eget, tincidunt quis sem. Vestibulum rhoncus lorem ut diam mollis sit amet hendrerit velit suscipit. Integer nibh sapien, placerat posuere euismod quis, venenatis in risus. Vivamus blandit velit eu ante fringilla vitae euismod massa ultrices. Nulla ornare aliquam posuere. Sed hendrerit, sapien nec auctor ultricies, sapien tellus mattis dolor, ut euismod erat erat suscipit risus.

    No Read More link.

    Where is it?
  • edited 5:21AM
    Try using "get_excerpt_formatted" instead.
Sign In or Register to comment.