Advertisement
AMEEKER

Genesis, Custom fields, hook, two columns

Jul 15th, 2013
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. add_action( 'genesis_entry_content', 'address' );
  2. function address() {
  3. if(is_single() ) {
  4.  
  5. if(get_field('Address_1'))
  6. {
  7. echo '<div class="location">' . get_field('Address_1') . '</div>';
  8. }
  9. if(get_field('street_address_2'))
  10. {
  11. echo '<div class="location">' . get_field('street_address_2') . '</div>';
  12. }
  13. if(get_field('po_box'))
  14. {
  15. echo '<div class="location">' . get_field('po_box') . '</div>';
  16. }
  17. if(get_field('city'))
  18. {
  19. echo '<div class="location">' . get_field('city') . '<div>';
  20. }
  21. if(get_field('state'))
  22. {
  23. echo '<div class="location">' . get_field('state') . '</div>';
  24. }
  25. if(get_field('zip'))
  26. {
  27. echo '<div class="location">' . get_field('zip') . '</div>';
  28. }
  29. if(get_field('phone'))
  30. {
  31. echo '<div class="touchpoints">' . get_field('phone') . '</div>';
  32. }
  33. if(get_field('website'))
  34. {
  35. echo '<div class="touchpoints">' . get_field('website') . '</div>';
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement