Forums

"CMS" question... (6 posts)

  1. Righton
    Member
    Posted 7 years ago #

    I am converting my website over to WP and have a couple questions...

    I only have two pages (Contact and Resumé) that will be static. The other three pages need to contain post content (Index, Icons, and Portfolio).

    My question is, is there a way to duplicate my index.php to two other .php files and limit the output to only a certain category... (i.e. - index only displays posts in category 'main' and icons only shows posts in category 'icons')?

    I read over on another blog that such a thing USED to be doable before 1.5... is it able to be done now?

  2. lawtai
    Member
    Posted 7 years ago #

    I'm pretty sure you can still do this with query_post. Try searching with that keyword and see what you can find.

  3. Righton
    Member
    Posted 7 years ago #

    I'm assuming you're referencing this

    <?php query_posts('p=-1');?>

    If this is correct, where do I put it for it to take effect?

    I tried <?php query_posts('cat=1');?> in my index.php but no luck

  4. lawtai
    Member
    Posted 7 years ago #

    here's a pretty good writeup written by ifelse on query post

    http://www.ifelse.co.uk/archives/2005/04/08/query_posts-redux/

  5. Lorelle
    Member
    Posted 7 years ago #

    And another one that examines a variety of ways to use the WordPress Loop to generate different results at http://codex.wordpress.org/The_Loop_in_Action

  6. Righton
    Member
    Posted 7 years ago #

    I looked into the query_post info, but it seems, no matter where I place that code, it doesn't seem to want to work.

    The Code I'm using is <?php query_posts('cat=1');?> and I'm trying to use it in my index.php

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags