• mingisfawn

    (@mingisfawn)


    Hello all! I’m brand new to WordPress (today is day five), and I don’t know any PHP beyond what basic stuff I’ve picked up while creating my template. I’ve been using MT for a couple years now, and mocked up the site I’m presently working on in that first. I’ve scoured these boards and other sources, but haven’t been able to find anything to help me with what I’m trying to do (at least not that I was able to understand).

    This is the initial MT home page:
    http://lucidalbatross.com/sample1/

    As you can see there, I have one post from each category listed. This function is done fairly simply in MT. I cannot seem to figure out how to do that in WP. The WP version of this page is here:
    http://www.iconswag.com/wp/

    Can this be done simply? The closest I’ve come to finding what may be a solution is to use an extremely complicated batch of instructions which need to be repeated for each category, plus I’d have to manually identify each category ID. In MT this is accomplished by first starting a list of categories, and then displaying specific information about the last (or most recent) post.

    Comments, suggestions, links, and plugins are welcome. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Root

    (@root)

    I would edit my loop to call posts from one cat only. Each time I wrote a post I would add it to potentially 2 cats. Its subject cat and then optionally the front page cat if I wanted it to show. A single php hack for single cat is all you need.

    Thread Starter mingisfawn

    (@mingisfawn)

    Anyone have any other ideas? This seems like it would be viable, but a bit of an end run around what seems to me a fairly elementary concept. Having to assign the most recent post in each category to a secondary front page category, and then reassigning categories each time a new post is made, seems counterproductive. All this information exists, I just need to spit it out properly.

    Try it;

    <?php $my_query = new WP_Query(‘category_name=catname&showposts=1’);
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID; ?>

    YOUR CONTENT(LIKE <?php the_excerpt(); ?>)

    <?php endwhile; ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘one post per category on main page’ is closed to new replies.