Get Post Meta in conditional Tag (1 post)

  1. Nimz
    Posted 2 years ago #

    Hi, I am trying to create a fribie section of my website.

    And I want to automatically insert after each post and I succeeded. It display different message when user is logged and when user is not logged on the category that I want it to display,

    the only problem that I am facing is when getting the post meta work. I always got string error, unexpected when using this line:

    $freebielink = get_post_meta($post->ID, 'freebielink', true);

    Here's my working code:

    I also include
    global $post;
    above the if statement

Topic Closed

This topic has been closed to new replies.

About this Topic