Forums

[Plugin: Custom Field Template] Little question about calling get_post_meta (1 post)

  1. Dario Ferrer
    Member
    Posted 3 years ago #

    Hi,

    I'm constructed my Custom Field's forms without problems. I added a function file to convert many get_post_meta functions into variables. I used a method for this:

    ob_start();
    echo get_post_meta($post->ID, 'My Field Tag', true);
    $my_field_tag = ob_get_contents();
    ob_end_clean();

    So I can able to use $my_field_tag to place its content wherever in my site. Until now I have not problem, this works perfectly. However, I have more than 50 variables and I wish to ask if this is a good way to work, or in the contray exists a better method to do it.

Topic Closed

This topic has been closed to new replies.

About this Topic