• Hi there,

    I must put a custom query string as
    <?php echo get_post_meta($post->ID, “whatiwant”, true); ?>

    into a conditional tags as:
    <?php if (is_category(‘xxxxxxxx’)) { echo ‘hello’; } ?>

    instead of “xxxxxxx”

    how I can write the php code for this..?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Huh???? ??

    <?php
    $cf=get_post_meta($post->ID, "whatiwant", true);
    if (is_category($cf)) {
      echo 'hello';
    }
    ?>
    Thread Starter andreacutelli

    (@andreacutelli)

    uhm..
    I have written half problem :-))

    I must do this:

    <?php if( is_category(‘4’) ) echo ”;?>

    but ‘4’ (the category) must be this:
    category-<?php echo get_post_meta($post->ID, “whatiwant”, true); ?>

    and the echo must be this:

    <li><a href=" <?php echo get_option("home"); ?>/<?php echo get_post_meta($post->ID, "whatiwant", true); ?>/">example</a></li>

    how can I write this in php..??
    sorry again..!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘query string into a conditional tags.. how to?’ is closed to new replies.