• Hello to all in the wordpress comunity. I have a function that mix strings in a array:

    function gen_num()
    {
    global $post;
    $mixnames = get_post_meta( $post->ID, ‘fieldnames’, true );

    if ( ” == $mixnames ) {
    $input = array(“Neo”, “Morpheus”, “Trinity”, “Cypher”, “Tank”);
    $rand_keys = array_rand($input, 2);
    $mixnames = $input[$rand_keys[1]];
    update_post_meta( $post->ID, ‘fieldnames’, $mixnames );
    }
    // DISPLAYS THE OUTCOME
    print $mixnames;
    }
    1- I insert it in the output the_content post, and I also enter the tags field (meta tag of posts), how do? already tried something in the wordpress structure that suggests it was metatag but not see anything! I want to fill that field tags on the right side of the post edit.

    2- A curiosity, because the values that this function inserted in the body of the post, in the_content, do not appear on the dashboard in edit mode of posts? because not can bring up for me to do SEO for SEO plugin by Yoast, when I’m in edit mode I would like to edit things according to the plugin indicates, but on the site it appears, but in edition mode appears only what I wrote manually the posts! the values I call the above function not appear! because?

    Thanks to all. Best Regards.

  • The topic ‘how to insert it in the function in tags fields in edit post?’ is closed to new replies.