WordPress.org

Ready to get started?Download WordPress

Forums

Get Post Meta in conditional Tag (1 post)

  1. Nimz
    Member
    Posted 10 months 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:
    http://pastebin.com/YTzNG3RK

    I also include
    global $post;
    above the if statement

Reply

You must log in to post.

About this Topic