WordPress.org

Support

Support » How-To and Troubleshooting » How to have page call in specific blog posts??

How to have page call in specific blog posts??

Viewing 9 replies - 1 through 9 (of 9 total)
  • If I’m understanding the problem right, what you’re looking for is here:

    http://codex.wordpress.org/Function_Reference/query_posts#All_Posts_in_a_Category

    You just need to specify the ‘category_name’ parameter. You can also use the ‘cat’ parameter if you’d rather use the category id – check out example 4 on that page.

    Hell ya, example 4 worked. Just changed the category to the right one and it works great.

    Thanks a lot for the reply man. Really made my night!

    Okay, update, so I got the posts to show up in the Press section, but I need to have it so that the posts also include the author, ability to comment, etc.
    http://www.moko.com.php5-21.websitetestlink.com/?page_id=14

    The “blog” section with all the posts looks the way it should, I just need the same functionality on the “press” page above.
    http://www.moko.com.php5-21.websitetestlink.com/?page_id=217

    I am currently using the following code to bring in the posts from the press category, is it possible to also include other things to bring in so that it woks the way it should? such as author, comments, etc?

    <?php
    $args = array(
    ‘cat’ => 6,
    );
    query_posts( $args );
    ?>

    Lil help? Just need to know what the array field for author, comment, etc I think. If I put those in the array like I did for ‘cat’ – it should work, right?

    I’m pretty sure all the fields should be brought in every time so if those fields arent showing up where you expect them to, I would look at your the tmplate page for “Press”, do make sure it’s trying to display teh author and stuff (it should really be basically a duplicate of whatever page is controlling the “blog” page – probably index.php? or maybe archive.php?).

    If those match, and you’re still not seeing what you’re after, I guess maybe we’d want to check ot make sure that the loop is being set up properly. That’s a little trickier (and by that, I mean: I don’t know it right off the top of my head).

    hmm… weak. Might you know where I can normally find this “loop”?

    I’ve dealt with it in the past, but it was in a different location I think… can’t quite remember. There’s no loop.php file or anything. I would imagine it’s in the index.php file, but I don’t really know what to look for.

    After this code is placed in my press template, everything else seems to get ignored, is that normal?

    <?php
    $args = array(
    ‘cat’ => 6,
    );
    query_posts( $args );
    ?>

    It’s tough to say without seeing hte code. Can you put the code for the press page on pastebin.com or somewhere? With that, I bet we could get it sorted out.

    um, ya, so here’s the index.php file where it would make most sense that the loop would be….
    http://pastebin.com/eMaBv7rS

    for what it’s worth, here’s the press template file…
    http://pastebin.com/zvH6PNaZ

    and the functions.php file…
    http://pastebin.com/SzgWPVhN

    Thanks so much for your help man, you have no idea how much it means to me.

    bumpy?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to have page call in specific blog posts??’ is closed to new replies.