Hey! Accordion in Tabs worked for me when I did what was mentioned earlier in this thread. Create one more Accordion and place it before the Tab field. Set that Accordion to use the Endpoint setting and voila, it works.
Actually I solved this now.
post_author (id 6) here is a specific user account for front end posting. I increased it’s capabilities to handle taxonomies and all is well now.
Came to report this issue as I just dicovered this on a brand new site I’m building. Found out, I’m not the only one, so hopefully this is fixed soon! 5.2.0 Pro here.
With your conditional, you mean this:
if( have_rows(’embedded_content’) ): ?
I’m pretty sure It’s returning true because in your screenshot you actually have a row. In the settings of a repeater field you can define minimum rows and if you leave that empty, then you can have a repeater field without any rows.
SO, solved?
I don’t see why that doesn’t happen anyway if you pre-define them for your client? You can restrict the users role from accessing the Custom Fields in the admin?
Oh but now I see if you are selling a theme you want it to have predefined metaboxes for templates already in place when the customer installs the theme themselves.
Hmm I still think it’s easier for you build that not using ACF and approach this with the idea of adding custom metaboxes. As ACF is clearly meant for UI use I think this approach is the right for you. The other metabox solutions in the following link approach this programmatically and not the user friendly UI way.
This should get you going really well as you seem to be able to figure things out:
http://themergency.com/wordpress-meta-box-roundup/
You can do that with the UI itself…
Here’s a screenshot:
http://aatospaja.fi/temp/template.jpg
When you set your fields to show up based on the template, they will automatically show up when you select the appropriate page template from the page settings.
May I ask, why do you need this / what are you trying to accomplish that you can’t use the admin UI?
Basically the plugin uses wordpress custom fields functionality (https://codex.wordpress.org/Custom_Fields) and if you wanted to manually create similar custom fields with your own metaboxes, you can find tutorials for that through google. I think you would be better off creating your own custom fields than trying to programatically add news ones through ACF system passing it’s UI. I’m sure if you start digging into the source code of ACF, you can find out how it builds the fields etc and from there you could call the functions etc. yourself…
https://codex.wordpress.org/Function_Reference/add_meta_box this should get you started on creating your own fields…
Have you read through this carefully?
http://www.advancedcustomfields.com/resources/field-types/select/
I believe this has nothing to do with ACF.
Some googling will surely give you the answers how to show tags with custom post type.
Like… http://wordpress.stackexchange.com/questions/59583/list-all-the-tags-from-a-custom-post-type
or… http://wordpress.org/support/topic/list-tags-from-custom-post-type
Hopefully you can figure it out!
Here’s a link to that image – This is the setting you need to use for the field group for it show up in the pop-up of the gallery
Well, did you try with the code I posted? As to me that seems to be the only thing wrong.
<?php the_field(‘client_name’); ?> to <?php the_sub_field(‘client_name’); ?>
I think your problem is the missing ‘option’ parameter like this:
<p><?php the_field(‘fest_date’, ‘option’); ?></p>
From the docs:
Template Usage
All the API functions can be used with the “Options Page’s” fields. However, a second parameter is required to target the options page. This is similar to passing through a post_id to target a specific post object.
http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-an-options-page/
The API doesn’t return any PHP code. Using php you can fetch the return values of a sub field that you can then use in your code…
I need some clarification what you are trying to do with your code above…
Because this: <?php if( get_sub_field(‘category’, 8) ): ?> …means that you are trying to check if post ID 8 has a sub field ‘category’.
If this is not what you want but instead want to see if sub_field ‘category’ has the value 8 you can do it like this:
<?php
$variable = get_sub_field(‘category’);
if ($variable && $variable == ‘8’) {
echo ‘Yes this post has a field category with value 8’;
}
?>
But as I’m not fully aware of your situation, I’m also thinking that you may be confusing actual wordpress categories and custom fields and if that’s the case, you code needs a whole different approach.
I can’t think of any way to do this with ACF but instead you could use one of the few watermark plugins available. Try them out?
I’ve had a great success with http://www.dfactory.eu/plugins/image-watermark/ although it also has it’s limitations. Maybe you could give it a try?
There can be many reasons for that… Do you have any experience in debugging possible javascript etc. errors?
My wild guess is that your theme or some plugin(s) are loading js code that causes a conflict and prevents the functionality.
Have you had the same issue on some other websites? Or is this the only time you are seeing this?
Hard to know for sure as there is no way of knowing how you have your custom fields set up but by looking at your code you could try changing:
<?php the_field(‘client_name’); ?> to <?php the_sub_field(‘client_name’); ?> and same with the other field.
Do you mean they don’t appear automatically in the old posts or you can’t see them if you go to add images to the gallery field?
I don’t think there is any easy way for you to accomplish what you want other than editing each old post and adding the correct images to the gallery field so that the data gets saved into the database and you can display it in your theme. This can possibly made easier if you set the gallery field to show only images uploaded to the post.
Of course there could be a way to write a php script that would fetch the old images from old posts and alter the post custom metadata in the database to contain the gallery field code…
I don’t know exactly how you have your previous content set up but one another option could be to code your theme files in such way that if there is a new gallery field with content, display it but if not then use the old way and use php to alter how that data is handled…
If I understood you correctly, I’ve managed to do this by setting the field group to Attachment. This way you can easily add text field or other fields (don’t think all of them will work here) to the gallery pop-up (aka modal) window.
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.