Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

Trying to display Parent Category as header for Sub-Categories


 
Prev Previous Post   Next Post Next
  #1  
Old Aug 19, 2010, 11:59 PM
rodrigo
 
4 posts · Aug 2010
Trying to display Parent Category as header for Sub-Categories

Hello --

I recently dove headfirst into the world of Wordpress, Atahualpa, CSS and PHP, so I hope my question here makes sense. I have been trying to accomplish as much as I can within the parameters of the Atahualpa theme, and I am hoping this won't be too difficult.

I have set up my list of categories, and I also have many sub-categories (children). So, using the common example I have seen on other threads, I have:

Fruits
---apples
---oranges
---bananas
---strawberries

Vegetables
---carrots
---celery
---onions
---turnips

For each post, I assign the relevant children categories. For example, Post X will be assigned Apples, Bananas, Carrots, and Onions.

When I display a post on a page, I would like to display each relevant Parent Category first, followed by a semi-colon, and then the relevant child categories. In other words, I would like to display the following in the footer for the example above:

Fruits: Apples, Bananas
Vegetables: Carrots, Onions


Right now, it just displays:

Categories: Apples, Bananas, Carrots, Onions.

So, I guess I need to set up some PHP script that says something like, for each category parent, if child categories are present for that parent, then print "Parent Name", followed by a semi-colon, followed by all relevant Child Categories.

I think this seems possible with some of the category functions, I just don't know enough about all this and can't seem to find anything in the threads.

Thanks for any help!
 

Bookmarks

Tags
categories, category, footer links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display posts alphabetically for one category, chronologically for other categories spencer Atahualpa 3 Wordpress theme 4 Jul 16, 2014 09:01 AM
How to display posts from one parent category only on 'results' page JakeThePeg Center area post/pages 2 Sep 20, 2010 08:44 PM
Parent Categories Won't Produce Children Sonjapearl Page & Category Menu Bars 3 Feb 27, 2010 03:23 PM
Can I make pages only display main categories and not sub categories buddha Page & Category Menu Bars 0 Oct 24, 2009 06:53 PM
disable links in category menu for parent categories (only childless categories link) qcook2000 Page & Category Menu Bars 0 May 15, 2009 09:09 PM


All times are GMT -6. The time now is 12:52 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.