[resolved] How to create page listing title links of categories and their subcategories (3 posts)

  1. jalacom
    Posted 4 years ago #

    This is the site I'm working on: http://www.givethemsomethingbetter.com/gtsb. I am trying to create a list on the Recipes page of categories and their subcategories. Here's a screen shot of the idea of how the HTML would look: http://www.filedropper.com/screenshot2012-04-01at41730pm when you click on one of the recipe titles I would assume it would go to a single.php that shows the full recipe info.

    I've looked and looked for an answer on this. I'm assuming I would do this using a custom template archive.php page? I just don't know what the PHP would look like. I've been trying to sift through the code and understand what calls what.
    Secondly, and perhaps this goes hand in hand with the first question, The name of the page is Recipes, but should I create a category called Recipes, make subcategories out of items like Breakfast ideas and then further make the individual recipes subcategories of those?

  2. jalacom
    Posted 4 years ago #

    Ok so i did find something that is very close to what I wanted. It's posted here: http://wordpress.stackexchange.com/questions/28469/display-list-of-sub-categories-and-the-posts-they-contain-within-one-main-categ

    This is what the code looks like that i grabbed :

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I used that in a custom archive file and assigned it to my Recipes page. I need to go through and remove some of the extra stuff I didn't want but this essentially does what I was asking. (I believe?) http://www.givethemsomethingbetter.com/gtsb/recipes

  3. jalacom
    Posted 4 years ago #

    well the code was removed by the moderator, but you can find it at the provided link

Topic Closed

This topic has been closed to new replies.

About this Topic