Hide Metadata Based upon Category [Twenty Eleven]
-
Hello,
I am new to WordPress and very new to PHP and I have a question about metadata and how to avoid displaying it. I’ve been through the forums and while I’ve seen a lot of people ask similar questions, I was not able to find an answer to my question. I hope that I’m asking this question in the right place.
I am developing a child theme based on the Twenty Eleven theme. I will be organizing post content by category. For specific categories I would like to remove some or most of the metadata (i.e. author, date, etc.) but I still want to display other metadata (i.e. categories).
Would someone please advise on the best way to do this? Do I recreate the function twentyeleven_posted_on() in my child theme’s functions.php file?
I think it must start with some PHP like:
<?php if (is_category(’13’))(in the above, 13 is the category ID for the category I want to exclude some metadata from)
Any advice would be much appreciated. I cannot link to the site I am building as I am working on it locally (MAMP, Mac OS X).
Thank you in advance for your time and consideration.
- The topic ‘Hide Metadata Based upon Category [Twenty Eleven]’ is closed to new replies.