Sorry for my bad english. Yep, I meant the Add Plugins screen.
Hello James,
Thank you very much, it does make sense. π
And lost some field values. π
Sorry, I was using ACF 4. I just bought ACF5. π
I try to do this on a relationship field, and for the same post type.
I reuploaded the plugin, but the problem remains.
Don’t hesitate to ask me for access credentials if it helps.
I tried to delete a relation in the post I encountered the issue and a blank page again. I tried with another post: creating a new relation between (custom) posts, and blank page again. I deactivated ACF Post-2-Post, and now I can publish without any problem.
lol Ok, ok John. I’m reinstalling now (and deleting those scripts). π
At first, this error text didn’t show, so it’s normal you thought it could be a timeout error.
I still have the error though. But now, it’s pure blank page (no more error text). I reuploaded the functions.php file with the script from the tutorial, and it is still pure white page (no text error).
You made it very clear (and complete, I guess). Thank you again John!
Thank you John for your explanations and for this smart trick (but doesn’t work in my situation). It’s very clear for me how timeout issues work. π
Yes, there’s a lot of fields (around 30 blocks in the screen options) but most of them are empty.
Now, when going back to http://www.example.com/wp-admin/post.php I just get this message:
Warning: in_array() expects parameter 2 to be array, string given in /home/xxxxxx/xxxxxx/wp-content/themes/wplmsblankchildtheme/functions.php on line 179
Fatal error: [] operator not supported for strings in /home/xxxxxx/xxxxxx/wp-content/themes/wplmsblankchildtheme/functions.php on line 183
The two lines concerned:
// bail early if the current $post_id is already found in selected post's $value2
if( in_array($post_id, $value2) ) continue;
// append the current $post_id to the selected post's 'action-bonne_pratique' value
$value2[] = $post_id;
I followed this tutorial: https://www.advancedcustomfields.com/resources/bidirectional-relationships/
I don’t have this message for another post (same CPT). ^^
I’m sorry. It works now. I forgot to remove the WP functions with the plugin (CM Tooltips) that I use.
Hello,
It is possible to return the raw data from the database by passing a false parameter to the the_sub_field function?
I tried this:
the_sub_field('the_field_name', false, false);
But I still have paragraphs.
Can you help me, please? π
For info: a prevous similar topic.
Hello James,
CMinds team fixed the issue. π
Hi James,
Yep! Creativeminds support answered me to try with disabling parsing (CM Tooltip Glossary Ecommerce plugin highlights terms that are in the glossary) of the ACF fields, and… it works now. But I really need ACF to be parsed. π I’m asking them if they can make their extension more compatible with ACF.
Hey James!
So, I guess, no need to send screenshots, it works when I deactivated CM Tooltip Glossary Ecommerce plugin.
Hello James,
Thank you.
I tried:
<?php echo get_field('the_field_name',false, false); ?>
But I still get the P tag.
I get it!
<?php the_field(‘tgg’); ?>
I guess the quotes were wrong. π
But it looks I only can display text type fields. π
Hey James,
Thank you. I tried to follow what is written in the recommended page before posting here. π
I can’t specify the post ID because the value is supposed to be attached to the current post. For instance, on the Tomato post, the color field value that is supposed to be displayed is red, when on the salad post, it is green. So how could I display colors dynamically on posts?
When I was talking about taxonomy, I did not expect to add a field to a taxonomy, but to filter same post type with taxonomy. π
I uploaded the functions.php, with the new script: a syntax error appears on line 108. In fact, this error appears when I want to go in the WP backend. The screencast.
Did you edit the field keys to match the relationship fields that youβre trying to connect?
I should edit your function script before I upload it, right?
Thank you for the script John!
In fact, I have a thesaurus build with (CM Tooltip glossary premium), where we can find simple concepts, best practices, and actions. They’re all of the same type, only their taxonomy is different. Say I want to link a best practice to a concept. The name of the relation is “acf_reciprocal_relationship”. The field is used in two group fields, and the title of the field is “Test”.
1. I put the script in the functions.php theme’s file and I uploaded it.
2. I went to ACF 4, and created a new standard relationship named “acf_reciprocal_relationship”.
3. In a concept edit page I selected two best practice and I published the post.
4. I refreshed then the associated best practice edit page: nothing shows up. I can’t see any relationship (the field is empty). π
It would be really nice John.
I don’t feel very comfortable with the understanding of the “single field” (maybe because of my limited english lol). Could you be more precise, or provide a textual example, please?
All right John, no problem. π Thank you for your detailed explanations.
I may buy ACF Pro, but before, I’d like to be sure, with your plugin, I would have dedicated labels for different CPTs, or taxonomies. I’ma try to be more precise by giving an example. Imagine an artist page, and an album page. Would I be able to have “Album:” label on the artist edit page, and “Artist:” label on the album edit page? Of course, I don’t want to create the relation twice.
Thank you John.
When I publish, after creating a standard relationship, I encounter this error:
Fatal error: Call to undefined function acf_get_field_groups() in /home/toto/example/wp-content/plugins/acf-post2post-master/acf-post2post.php on line 187
SOLVED!
I found how to do this by adding a rule. I selected the right taxonomy.
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.