/ 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)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE html> <html <?php language_attributes(); ?>> <head> ...css, javascript etc </head> <body> <div id="header_bg"> <div id="header"> <div id="address"><?php if (get_field('address', 'options')) { the_field('address', 'options') } ?></div> </div> </div> ...nav etc