I used the guide I found on this page to write this code:
<?php if(the_field('publication', get_option('page_for_posts')))
{
echo ' / '.the_field('publication', get_option('page_for_posts'));
}
?>
It works, in that it pulls the publication name to the Blog page. What does not work, no matter how I try it, is getting any text before the Publication name. As you can see in my code, I am attempting to put a ” / ” before the publication name. The slash is not showing. Nor is anything I try and echo. Am I doing the If statement wrong?
You need to use get_field
. the_field
echos the content of the field
<?php if(get_field('publication', get_option('page_for_posts')))
{
echo ' / '.get_field('publication', get_option('page_for_posts'));
}
?>