Custom fields not accessible in footer.php
-
Hi,
I am building a bilingual site (https://www.pedkl.si) and using a custom variable to determine which language the post / page is in. If I use this code
<?php $key=”language”; echo get_post_meta($post->ID, $key, true); ?>
in the header.php or sidebar.php, it returns the right thing. But if I use it in footer.php, nothing is displayed.
I would be grateful for any hints on how to solve this. Thanks.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Custom fields not accessible in footer.php’ is closed to new replies.