WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] if post_meta value = X

[Resolved] 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') { ?>
    eastbank

    @eastbank

    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 ‘[Resolved] if post_meta value = X’ is closed to new replies.
Skip to toolbar