Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other [Solved] posts on a page template

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #30095
    leonpaul
    Member

    Hi!
    I’m trying to create a French info website.
    I’m taking inspiration from this one:
    http://www.newleftproject.org/
    I’m using WordPress 3.0.1 and the santorii theme http://code.google.com/p/satorii/

    Basically, I’d like a home page with the 4 or 5 latests posts, not necessarily with “previous/next” navigation. That I have more or less achieved.
    In addition to that, I’d like to have an “Articles” page – that would look sort of like this one http://www.newleftproject.org/index.php/site/articles/
    with an access to all posts, with previous/next navigation.
    I’ve tried stuff using the get_posts function on a page template, but this gives limited options (particularly regarding the next/previous thing).
    Is it possible to have the loop giving access to my posts (and not the page content) on a page template?
    Or would you have any other solutions?
    Thanks a lot in advance,
    Léon-Paul

    #80991
    Darfuria
    Member

    You can use WP_Query to query posts/pages however you like:


    have_posts()) : ?>have_posts()) : $myquery->the_post(); ?>
    Title:
    Content:
    Excerpt:
    Link:
    Author:
    #80984
    Chris Coyier
    Keymaster

    I have a screencast on “The Loop” coming up this week and might shed some light on the issue.

    #80979
    leonpaul
    Member

    thanks to both, that worked!
    I have to say the instructions on the wp_query in the codex are quite confusing…

    #80977
    Chris Coyier
    Keymaster

    I’m actually generally a query_posts man myself, I find it much easier, but that’s a whole philosophical debate I guess =)

    #81220
    siddr
    Member

    Screencast on “The Loop”, I really really needed that!!

    I think you are reading my mind ;)

    Eagerly waiting for that, thanks, thanks, thanks again and again.

    #80787
    Chris Coyier
    Keymaster
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Other’ is closed to new topics and replies.