How to display dropdown filters for posts
How to display dropdown filters for posts
How to display dropdown filters for posts
2 things I noticed: get_field() isn’t specifying a post to get the field from, which is necessary outside the loop: $add_description = get_field( ‘body’, $post->ID );` And to set a post meta value you should use update_post_meta(), not wp_update_post(): update_post_meta( $post->ID, ‘_aioseop_description’, $add_description );
As I am new here too, I can’t comment and ask for clarification or give some suggestions, so I’ll do that here. Why do you have nested repeaters recent_documents and new_document? It appears that recent_documents always has only single row, otherwise there would be a mess. But anyway, working with what you have, you could … Read more
ACF Repeater and Sort
…Removed my prior ‘solutions’… So, the real problem here is that this function is hooked to publish_post action, at which point the post might not be saved yet, if it is a new post. Only if it is a post already saved but with some other status, we can access the ACF values using get_field(). … Read more
I’m assuming that $attachments_ids are the new values you want to save. $field = get_field(‘images’); $attachments_ids = [ 0 => 22222, 1 => 33333, 2 => 44444, 3 => 55555 ]; update_field($field, $attachment_ids, $post_id);
You would at least need to create one page where you can list all the info. In the php template for that page, you can then change that info based on the page you’re linking from. That would be the same link for all pages though (you could get around that with rewrite rules, but … Read more
After attempting many upgrades of various WP and ACF versions, I have concluded that WP 3.8 to 4.2 with ACF 4 data can not be upgraded to WP 4.3+ withACF 5. Reason WP 4.3 introduced a feature called split_shared_term, which affects the data used by ACF 5. ACF 4 stores the data in a manner … Read more
No it won’t. it will still be there and WPbakery will format it into one of it’s text boxes if you choose that editor on a page/post edit screen. It’s always a good idea to back your site / db up if you are concerned about it though!
Well, your problem lies in your CSS code. .card-container .main-content:hover { background: <?php the_field(‘background-farbe’ ); ?>; background-blend-mode: multiply; } It uses class only, so it will be applied to every element with that class. Multiplying the same code with different colors won’t change anything – only one such rule will be active. So how to … Read more