displaying a custom field value in the post
-
Imagine a text custom field in post-edit.php, function key = “function_name” and you want to print the value of this field in a specific area of the post
I tryed with a fancy function, maybe something it’s usefull, and the rest is to fix
// Get nome $nome = '<div class="nome">'. get_post_meta ( $post_id, $key = 'function_nome' ) .'</div>'; function print_nome ($content) { if (is_singular('post')) { $content = $content . '<footer class="author_bio_section" >'. $nome.'</footer>'; } return $content; }
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘displaying a custom field value in the post’ is closed to new replies.