• Resolved lefty

    (@lefty)


    Ok, writing this here – instead of the MU forums and guessing that this would be a better place to ask.

    I need to output the following on a page (without a plug-in, on a MU install):

    Category 1:
    post title_a
    post title_b
    post title_c

    Category 2:
    post title_a
    post title_e

    Some posts will end up belong to several cats, and I need it too update without any manual input.

    In essense, check for all cats, then list the posts that belong to each cat below the cat title.

    I’m hard-coding it into the page template – since the blog only has one page (acting as an archive).

    Thanks a bunch!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Don’t know what WordPress MU is but can’t you just do two loops so:

    Cat 1:
    Loop 1 here:
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php if (in_category(’52’)) continue; ?>
    Do whatever
    <?php endwhile; else: ?>

    Then Rewind
    <?php rewind_posts(); ?>

    Cat 2:
    Loop 2 here
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php if (in_category(’87’)) continue; ?>
    Do whatever
    <?php endwhile; else: ?>

    Sorry if I didn’t get your post.

    Thread Starter lefty

    (@lefty)

    WordPress MU (multi user) can be found at: mu.wordpress.org

    For security reasons, WP MU, doesn’t allow users to do any changes to the templates used on their specific blog. Changes need to be made elsewhere and then copied over by FTP.

    The problem with the above, is that it requires the user of the blog to manually punch in the code for every new category they add – figure out the ID of the category and then change it for every loop.

    It should be something along the lines of:

    Get first category (by ABC)
    do break and list
    get all posts names that fit category (linking to actual post)
    do another break
    —start over in the same loop (second category by ABC, then posts)

    Thread Starter lefty

    (@lefty)

    Ok – I figured it out. This:

    http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/

    Plug-in did the trick and seems to work perfectly with MU.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘List Category then Post title, without a plug-in … in WordPress MU’ is closed to new replies.