Forums

Homepage, latest posts using the more tag (3 posts)

  1. dannykilla
    Member
    Posted 10 months ago #

    Hi,

    I am trying to create a homepage where I have a featured slider that uses the excerpt, now I want to have the latest posts on my homepage too but using the more tag.

    Now I have the latest post on the homepage at present but it too is using the excerpt and not the more tag which doesnt look pleasant.

    Here is the code I'm using.

    <?php if ( is_front_page() ) { ?>
    
    <h3 class="hpost">Latest Post</h3>
    <?php $my_query = new WP_Query('category_name=news&showposts=1');
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <?php
    query_posts('showposts=1&cat=5');
    while(have_posts()) : the_post();
    ?>
    <?php endwhile; ?>
    <?php endwhile; ?>
    <?php } ?>
    <?php }

    Now, I have very very little knowledge of hooks, fuctions and so on... so if anyone can give me any assistance it would be appreciated.

    Basically I want it so that the latest post shows using the more tag, so that it will display an image that is in the post.

    Thanks

  2. alchymyth
    The Sweeper
    Posted 10 months ago #

    your posted code would not show anything - please paste the full code of the tempalte into a http://pastebin.com/ and post the link to it here.

    link to your site?

  3. dannykilla
    Member
    Posted 10 months ago #

    Hi Alchymyth,

    First of thanks for the reply, Im using Pagelines and the above code is added to the functions.php file.

    Here is the complete code of that file:

    http://pastebin.com/VpTDvG6R

Reply

You must log in to post.

About this Topic

Tags

No tags yet.