Posted By

BK4D on 11/02/11


Versions (?)

ACF Options fields in Wordpress theme header.php

 / Published in: PHP

Simple sample of my header.php trying to grab the 'address' field from the Options page, but no luck. Same with my footer.php. BTW it works fine in my other template files (page.php etc)

  1. <!DOCTYPE html>
  2. <html <?php language_attributes(); ?>>
  3. <head>
  4. ...css, javascript etc
  5. </head>
  6. <body>
  7. <div id="header_bg">
  8. <div id="header">
  9. <div id="address"><?php if (get_field('address', 'options')) { the_field('address', 'options') } ?></div>
  10. </div>
  11. </div>
  12. ...nav etc

Report this snippet  


RSS Icon Subscribe to comments
Posted By: Nuno on August 22, 2015


Here is the solution for your problem :

Nuno @

Posted By: Nuno on August 22, 2015

" "

You need to login to post a comment.