In order to display custom field values in the sidebar and the footer.
You will need to provide a second parameter of the post id to the the_field/get_field function.
$post_id = null; // current post $post_id = 1; // post 1 $post_id = "option"; // options page $post_id = "options"; // same as above $post_id = "category_2"; // target a specific category $post_id = "event_3"; // target a specific taxonomy (this tax is called "event") $post_id = "user_1"; // target a specific user (user id = 1) the_field( "text_field", $post_id );
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.