• Resolved do77

    (@do77)


    Hi.

    I am using the TDO Mini Forms plugin and I have a problem pulling the information from the custom fields into specific box on my homepage. Each post on the homepage looks like this:

    _____________________________________________________________

    TITLE

    POST CONTENT

    CUSTOM FIELD 1 | CUSTOM FIELD 2 | CUSTOM FIELD 3
    ______________________________________________________________

    Customfield 1 – 3 are three floating boxes at the end of each post within the loop. Now, I would like to publish the information that have been typed into the custom fields in the appropriate boxes.

    Are there template tags that let me do that? Or how can I create this outcome?

    Thank you very much in advance everyone!
    do77

Viewing 7 replies - 1 through 7 (of 7 total)
  • Assuming you are talking about display custom fields in a loop, then Custom_Fields should get you the answer.

    Thread Starter do77

    (@do77)

    Thank you MichaelH!

    Are the custom field widgets of TDO Mini Forms regular WordPress Custom fields? IF so, how to I get a specific custom field to show up in a specific box for example.

    It says I should use the <?php the_meta(); ?> template tag. But how to I narrow it down to a specific custom field?

    do77

    Thread Starter do77

    (@do77)

    I am still having problems with using a template tag to pull the information entered in a custom fields. This is what I did:

    1.) Added custom fields widget to the TDO form

    2.) Added a key to the custom field –> best (random)

    3.) Added the following template tag to my index.php file within the loop
    <?php $best_values = get_post_meta(76, ‘best’); ?>

    Result: It does not pull the information entered in the custom field with they key ‘best’

    Any idea why? I would appreciate any help!!

    Thank you,
    do77

    In a loop put the_meta() to displays the custom fields.

    Also edit post 76 to see if the custom fields are there.

    Thread Starter do77

    (@do77)

    Hi MichaelH,

    I now added the following string within the loop:

    <?php $best_values = the_meta(‘best’); ?>

    The problem is that it pulls all custom fields and not only the one with the key best. It also displays the custom field values in a list.

    How do I narrow it down to only the custom field with the key best?

    Thank you!
    do77

    See Function_Reference/get_post_meta

    <?php
    $best_values = get_post_meta($post->ID, 'best', true);
    if ($best_values){
    echo 'Best values is: ' .$best_values;
    }
    ?>

    Thread Starter do77

    (@do77)

    This worked for me! Thank you a lot for your help MichaelH!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[TDO Mini Forms] How to pull information from Custom field to homepage’ is closed to new replies.