Dear Forum,
i need to start with the custom fields.
Its this Site:
http://wordpress.p154953.webspaceconfig.de/?page_id=558&lang=en
I need to put some custom fields on the right, so that our Team can work with the Site without me.
But i can’t display the Code i use:
<p class="anzeige"><?php echo get_post_meta($post->1302, 'anzeige', true); ?></p>
<p><?php the_field('anzeige'); ?></p>
<?php the_field( "anzeige" );
It must possible to do this.
Greetings,
hartu
Hi @hartu
Did you call the the_field() function outside The Loop section? If you did, you need to provide the ID of the post/page as the second parameter like this:
<?php the_field( "anzeige", 99 ); ?>
Where 99 is the ID of your post/page that has the custom field. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/the_field/.
Hope this helps.