WordPress.org

Ready to get started?Download WordPress

Forums

Have Page Content in Query_Var template (4 posts)

  1. Seaborn
    Member
    Posted 7 years ago #

    So im still learning the ins and outs of wordpress so im hoping there is an easy solution to my problem. Im using wordpress as CMT. I would like my homepage to have the latest post on top of the page and below that to have page content. I have created a single page that uses a theme I created with this query_var code:

    <?php
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("cat=-0&showposts=1&paged=$page");
    load_template( TEMPLATEPATH . '/index.php'); //loads index
    ?>

    This displays the latest post fine but no content below. Is there a simple line I can ad to make sure the content I want is displayed below?

    Also, if possible I would like for the single post to be cut off by a "Continue Post" link which will link to it's post URI.

    Anyone have any suggestions?

    -Patrick

  2. moshu
    Member
    Posted 7 years ago #

    A paged index and a Pages are two different things. Whci one are talking about here?

    I don't know code, so in similar cases I just use the home.php template and the get_a_post plugin. Can't be simpler than that.
    http://codex.wordpress.org/Template_Hierarchy
    http://guff.szub.net/2005/01/27/get-a-post/

  3. Seaborn
    Member
    Posted 7 years ago #

    The get_a_post plugin ended up hurting a lot more then helping - not allowing my to edit my theme. That problem is resolved now but Im still looking for a solution for my original question. Im using the Static Front plugin - Since page's arnt designed to show posts should I use a feed reader plugin? I would really like the post to only show a certain amount of lines with a "Continue Post" link.

    Its important to show that latest post as well as page content that i can update regularly.

  4. Seaborn
    Member
    Posted 7 years ago #

    Any Clues?

Topic Closed

This topic has been closed to new replies.

About this Topic