Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This should be an easy one for everyone here. I am trying to remove the post meta function from my category pages only and keep it everywhere else. I currently have a function:

/** Customize the post meta function */
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter($post_meta) {
if (!is_page()) {
$post_meta = '[post_categories]';
return $post_meta;
}}

How can I add an if statement in there to make it so if (is_category()) to make $post_meta = '';

Any ideas? Will be waiting your responses guys, thank you!

share|improve this question
add comment

1 Answer 1

try this:

/** Customize the post meta function */
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter($post_meta) {
if (!is_page()) {
    if (is_category()) $post_meta = '';
    else $post_meta = '[post_categories]';
return $post_meta;
}}
share|improve this answer
    
Amazing, that did it. Guess I need to start learning PHP. –  Hasan Khan May 3 '12 at 5:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.