Posted By

kstetson on 06/03/09


Tagged

php template wordpress code field custom


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

mlangfeld
tmbrenneke


Custom Fields Template in WP - corresponding code snippets


 / Published in: PHP
 

  1. // On code side:
  2.  
  3. Category:&nbsp;<?php
  4. $group = get_post_meta($post->ID, 'Category');
  5. foreach(($group) as $groups) {
  6. echo $groups;
  7. }
  8. ?>
  9.  
  10. Features:&nbsp;<?php
  11. $group = get_post_meta($post->ID, 'Features');
  12. foreach(($group) as $groups) {
  13. echo $groups;
  14. }
  15. ?>
  16.  
  17. <?php
  18. $group = get_post_meta($post->ID, 'SiteLink');
  19. foreach(($group) as $groups) {
  20. echo $groups;
  21. }
  22. ?>
  23.  
  24. <?php
  25. $group = get_post_meta($post->ID, 'Description');
  26. foreach(($group) as $groups) {
  27. echo $groups;
  28. }
  29. ?>
  30.  
  31.  
  32. // On wp side:
  33.  
  34. [Category]
  35. type = textfield
  36.  
  37. [Features]
  38. type = textfield
  39.  
  40. [SiteLink]
  41. type = textarea
  42. rows = 2
  43. cols = 60
  44. tinyMCE = true
  45.  
  46. [Description]
  47. type = textarea
  48. rows = 8
  49. cols = 60
  50. tinyMCE = true

Report this snippet  

You need to login to post a comment.