• Resolved deckster0

    (@deckster0)


    I need a some kind of code snippet that will do something like this:

    <?php
    $test = get_post_id(post->ID, "testing", TRUE);
    if($test !== '') {
    echo "<div class=\"view\">Hello world</div>";
    }
    else
    {
    echo "<div class=\"notview\">Access Denied..</div>";
    }
    ?>

    But for some reason this code I wrote doesn’t work? Or is it just me using it in the wrong way?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘If custom field exists’ is closed to new replies.