• mightydave

    (@mightydave)


    I’m an idiot – I know this already.

    In my site, the main categories will be used for posting – that’s just fine. My link categories are identical and will house documents that are tied to the specific main category. So, if my Category 1 is Baseball – my link category 1 is also baseball. In that link category, I want to provide links to category specific documents.

    So, how do I output a list of documents (links) for the category that was chosen. I assume it will involve creating a category template – but I want to do it without having to create a category page for each. Any help would be wonderful!

Viewing 4 replies - 1 through 4 (of 4 total)
  • lawtai

    (@lawtai)

    You could do this by using if else statements. If category 1, then show link list 1, else none, and just do that for all the categories. Not sure if there’s an easier way, but I’m pretty sure that my suggestion would do what you want.

    Kafkaesqui

    (@kafkaesqui)

    Actually, it can be easier than that.

    For the display of categories themselves (posts within a category would be a whole other kettle of fish), you could use wp_get_links() (or get_links(); it’s up to you) and pass the current numeric category ID this way:

    <?php wp_get_links($cat); ?>

    Check out the info on the various Links Manager tags for one that suits:

    http://codex.wordpress.org/Template_Tags#Links_Manager_tags

    lawtai

    (@lawtai)

    haha there you go, an easier way 🙂

    Kafkaesqui

    (@kafkaesqui)

    I prefer the easy way. Unless I’m being paid to do it… ;)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Link list based on Category’ is closed to new replies.