Support » Fixing WordPress » if post_meta value = X

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    try it with $post instead of $page (even if on a page):

    <?php if ( get_post_meta($post->ID, "Color Sorts", true)=='tan') { ?>

    Thanks, I got it to work using this:

    <?php if ( get_post_meta($post->ID, “Color Sorts”, true)==’tan’) : ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘if post_meta value = X’ is closed to new replies.