Hi @hube2 @photocurio !
Do you plan to add this into core for that ? The plugin you mentioned has not been updated for 4 years…
Thank you in advance !
Thank you, I’ve adapted the code for two different relationship fields in two different custom post types and it’s working well, thank π !
Hi @acf-support !
It’s in the back-end. In the front, I can do the ckecks. But the link you gave me is for the back-end no ?
Hi @acf-support !
It totally makes sense π ! Good to know, Thank you very much ! Very powerful support π !
Hello @acf-support π !
It’s exactly the type of field I use : the relationship one π ! It returns an array of objects.
In your example, they query only on 1 ID. I need to query if at least one author is the author of a book. So here is what I want :
$lawyers_ids contains an array of multiple objects of the “author” CPT. I would like to query the books that have at least one of these authors in their “books_authors” relationship field.
Thank you in advance,
CΓ©dric
Hi @Hube2 !
Thanks for your answer.
I know I have to use the “register_field_group” function and the action “acf/register_fields”. What I’m asking here is a documentation that give us information about creating manually (through code) each type of field.
Because I’m creating a SAAS where all the fields have to be created through a plugin which will be available on all subsite, I can’t (and don’t want to) use the front-end method.
Thanks,
CΓ©dric
Hi @dakrau !
This is in the plugin by default π !
It’s ok, I keep only the needed entry in the xml backup and then import the fields with the WordPress Importer π !
Thanks !
Hi @daktau ,
No I haven’t got any feedbacks from the dev… SO I used http://wordpress.org/plugins/simple-page-ordering/ instead.
But I think that ACF 5 will have this in its core, right @elliot ?
Can’t wait for ACF 5 π !
Hi @elliot !
For current client (we’ve purchased 3 add-ons right now), will we have to buy a new license or not ? When you say “will be released very soon”, you mean very very soon :p ?
Thanks for you great work π !
Hi @elliot !
When will this be added ?
Thanks a lot !
Hi @elliot, @kurdt_the_goat,
I know Gravity form but it’s a little bit complicated for my client. I’ve tried a lot of plugin and Ninja Forms is the one I need for my client.
So as @kurdt_the_goat said, I can do it with a simple textarea where the client can simply type the form ID, but I think it’s not user friendly at all. What I want is to have a select box with all the forms (their title) as an option and that this field returns the id of the form so I can use it as I want…
Any idea how I can generate a field like that ?
Hi @elliot,
I have an option panel with the posts type, but not the ACF post type :s !
I will contact the dev and let you know what’s going on π !
Thanks
Thank you very much @elliot π !
Hi @elliot !
I already use this plugin http://wordpress.org/plugins/simple-custom-post-order/, which also allows taxonomy ordering (yours doesn’t), but it doesn’t seems to be compatible with your field groups, don’t know why π
Hi @elliot
1. ‘post_object_field’ was not the real field name, I give this to you because the real name was a weird french word, so I thought it was easier for you to understand this name π !
2. You are right ! It had to be just the post_id, thanks ! But why ? the ACF field returns an object so why do I have to compare to just the object’s ID ?
Thanks for your help π !
CΓ©dric
Hi Elliot !
Nice, you’re right it works π !
Any possibilities that in the future, you could add a section for each post type in the first field ? As we have
Posts
Category
We could directly have
My first Custom post type
My Custom taxonomy
Instead of have them in the second field ?
Hi Elliot and thank you for you response.
Here is how I vahe registered my CPT :
function custom_post_type2() {
$labels = array(
'name' => _x( 'Products', 'Post Type General Name', 'twentythirteen' ),
'singular_name' => _x( 'Product', 'Post Type Singular Name', 'twentythirteen' ),
'menu_name' => __( 'Products', 'twentythirteen' ),
'parent_item_colon' => __( 'Parent Product:', 'twentythirteen' ),
'all_items' => __( 'All Products', 'twentythirteen' ),
'view_item' => __( 'View Product', 'twentythirteen' ),
'add_new_item' => __( 'Add New Product', 'twentythirteen' ),
'add_new' => __( 'New Product', 'twentythirteen' ),
'edit_item' => __( 'Edit Product', 'twentythirteen' ),
'update_item' => __( 'Update Product', 'twentythirteen' ),
'search_items' => __( 'Search Products', 'twentythirteen' ),
'not_found' => __( 'No Products found', 'twentythirteen' ),
'not_found_in_trash' => __( 'No Products found in Trash', 'twentythirteen' )
);
$args = array(
'label' => __( 'product', 'twentythirteen' ),
'description' => __( 'Product Page', 'twentythirteen' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
'rewrite' => array( 'slug' => 'nos-produits' ),
);
register_post_type( 'product', $args );
}
// Hook into the 'init' action
add_action( 'init', 'custom_post_type2', 0 );
In the attached file, you can see what I have. I want to have my custom post type in field 1. and the the different title of my create post in field 2.
After doing what you say, I still have only what you can see in the attached file in the field 1.
Thanks a lot for your help.
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.