Pretty sure you can add the title to the new post like so:
<?php acf_form(array( 'post_id' => 'new_post', 'post_title' => false, 'post_content' => false, 'new_post' => array( 'post_type' => 'tickets', 'post_status' => 'publish', 'post_title' => 'my title' ), fields' => array('field_5ba8b0c6a5116', 'field_5ba8b08c96be1'), ); ?>
Seems nicer, but you don’t have access to the new post ID 🙁
Ah. Yes. This is the intended functionality. Never considered syncing the values of option pages. Perhaps you might consider a network option for these fields? This way your value can be accessed by all sub sites?
I get this issue now and again and usually comes from conflicting naming convention on your fields or if you have some field groups registered in both json and in the DB that are sharing field keys for some reason (human error)
Hey guys I developed a customisable solution for this. Check out my post here: https://support.advancedcustomfields.com/forums/topic/multisite-sync-solution/
Hi Elliot. My issue with tinymce seems to have persisted unfortunately. See my above post.
Just to confirm my scenario for debugging:
Let me know if there is anything else I can do to help debug from my end. I’m out of ideas here.
Can I just add more fuel to the fire here, maybe my info will help identify any issues.
What I am experiencing is on acf_forms frontend. If The user is defaulted to the ‘visual tab’ on the WYSIWYG editor when the page loads the WYSIWYG fails to fully instantiate. However if the user is defaulted to the ‘text’ tab and then clicks on the ‘visual’ it loads fine.
See attached screen grab of my console error when you click on the ‘visual’ tab when the WYSIWYG when you the page load brings in the ‘visual’ tab as default
If you can be more specific as to what method you are trying to use then I can provide an example because they can absolutely be used for logic. Pretty much the whole reason for them 🙂
If I understand correctly there are already checkbox fields and radio button field types that you can change your custom field too…See the ‘Field Type’ dropdown.
To get the tax terms for that page you can use this:
Then plug this into a get_posts
get_posts(array( 'post_type' => 'quotes', 'tax_query' => array( // get_the_terms() stuff. ), 'order' => 'ASC', 'posts_per_page' => 5, 'orderby' => 'rand') ); ?>
Note: This is off the top of my head but I hope it sets you on the path to your answer 🙂
Just googled it. Appears to be a solution here:
You have to have your order by argument as an array:
$q = new WP_Query( array( 'orderby' => array( 'sticky' => 'DESC', 'published' => 'ASC' , 'hidden' => 'ASC' ) ) );
Need to be careful how you are calling these keys in though. Remember you need
'meta_key' => 'start_date', argument in there too.
I’ve never tried it will muliple custom fields but i’m guessing you will have to have the matching keys as an array also.
Sounds like you should be using Taxonomies matey. https://codex.wordpress.org/Taxonomies
I don’t understand why you would need this functionality as it is already built into wordpress?
Sorry. I’ve just looked at this further and it looks like you are messing up the two methods as mentioned in this page? http://www.advancedcustomfields.com/resources/relationship/
So the foreach you have used in your original code doesn’t need the <?php wp_reset_postdata(); ?> so you could remove that or you could use the first method in the linked example but you would have to restructure your $post and $p variable names.
Hope this helps!
Mate! I’ve just realised you’ve missed something after your foreach begins you have to set up the post data. Surely that will fix the weird activity?
<?php foreach( $posts as $post ): ?> <?php setup_postdata($post); ?>
Yeah.. My first thought was the $posts variable not resetting. Try sticking the <?php wp_reset_postdata(); ?> after the closing ul tag because it looks to me there may be some instances in that loop where it wouldn’t be reset or would be reset before you needed it to be.
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!
© 2020 Advanced Custom Fields. Subscribe