Yes, you need to use wp_localize_script.
From where are you calling this function (nbpe_build_address_string)?
No, not really like this. Unless you connect directly to the other site database using wpdb, look here: Using wpdb to connect to a separate database.
Otherwise, you could possibly achieve this using the JSON API plugin, but maybe security issue will occurs. There is also a lot of solutions to share content between websites, depending on what you want to share, try to be more specific.
Could you specify the field type of “ingredients”?
Hi @Baybbtout, you can also search through your child theme file for any of these strings which are normally part of the loop: the_title
, have_posts
, the_post
, $post
…
If you don’t find any of them, maybe they are still only located in your parent theme. Like @elliot said, there is not necessarily a loop file. Sometimes, a file with loop code is included via the get_template_part
WordPress function. Otherwise, there will be no particular file insulating this particular part of code.
But firstly, follow @elliot advice by searching in the single.php
and page.php
files.
Good luck!
Hi @elliot, of course.
When we create an ACF fields group, it is stored as a wp_posts record in the database and the post_name db field (which is the id of the group) is an generated string from the group title, e.g:
– The group title (post_title db field) is Options : Général
– The generated id (post_name db field) will be acf_options-g%c3%a9n%c3%a9ral
The equivalent php export result will be:
register_field_group(array (
‘id’ => ‘acf_options-g%c3%a9n%c3%a9ral’,
‘title’ => ‘Options : Général’,
‘fields’ => array ( …
It would be better for us, french fan of ACF, to have a non-accented generated group id 😉 That id would be acf_options-general
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.