How to display custom fields under post?
  • How do I display custom fields on single post right under the post?

  • cbavotacbavota February 14

    You would need to use the arturo_single_post_bottom action hook.

    add_action("arturo_single_post_bottom", "arturo_add_custom_field");
    function arturo_add_custom_field() {
    global $post;
    $cf = get_post_meta($post->ID, "your-custom-field", true; );
    echo $cf;
    }


    Something like that would add your custom field right below the post content, near the edit link.

Hey there!

Take a look around, and if you would like to add a comment or start a discussion, register by clicking on the button below.

Register

Categories

In this Discussion

Tagged