Help writing a custom theme function
Ok, so I know what I need to do, but I’m not awesome at PHP and could use a hand if any of you Gurus have a spare second.
In my theme admin I’ve written an option where the user can select a Parent Category for Photography and what I want to do is create a function that will take that parent and create a coma separated list of the parent and it’s children as category ID’s so that I can plug in the function call to an if statement in any of my template pages to call custom classes.
So the function needs to go like this:
Get the custom option for my_photography_catgory and check if it has children, if so, create a list of coma separated category ID’s into an array so the output would look like array(1, 3, 5, 6)
If anyone can help me out here I’d GREATLY appreciate it.
- The topic ‘Help writing a custom theme function’ is closed to new replies.