Forums

[resolved] Using custom fields to show a specific time (3 posts)

  1. Icethrill
    Member
    Posted 3 months ago #

    Well I am not that good at custom fields yet, so I am having trouble with creating a custom field that is named start_time and then showing the time like this in a post: "20:00". 20:00 is for example an value. But I am having trouble of showing that inputed time in a post. Its showing nothing...

    And I quite frankly suck at custom fields. The time just needs to be displayed.

    This is the code I am using:

    $starttime = get_post_meta($post->ID.'start_time',true);

    And then I am echoing out $starttime, though its not working at all.

    Thankful for any help at all!

  2. wearitwell
    Member
    Posted 3 months ago #

    Hmm... in the codex it says there has to be a comma between post-id and key.
    Maybe you should try that...

  3. Icethrill
    Member
    Posted 3 months ago #

    Oh, totally missed that! Thanks its working alright now.

Reply

You must log in to post.

About this Topic