1

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!

2

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;
}}
  • Amazing, that did it. Guess I need to start learning PHP. – Hasan Khan May 3 '12 at 5:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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