ound this in Where to edit Custom Content fields to optional if there is no plug in?

I am having 3 custom contents on my front page. Each of them must have an image. However, I want some of them not to have the image, I want to have that field optional.

Any idea where may I change it? I couldn't find any plug in related to that. Only in theme theme folder there is plug in: advanced-custom-fields but I can't find it through wordpress.

The theme is custom, made by another guy so I am not really familiar with that.

I have found this in acf-flexible-content/view directory:

tr class="required"
td class="label"label?php _e("Required?",'acf'); ?/label/td
td
    ?php 
    do_action('acf/create_field', array(
        'type'  =  'radio',
        'name'  =  'fields[' .$fake_name . '][required]',
        'value' =  $sub_field['required'],
        'choices'   =  array(
            1   =  __("Yes",'acf'),
            0   =  __("No",'acf'),
        ),
        'layout'    =  'horizontal',
    ));
    ?
/td
/tr

But I guess this is html which is shown upon creation of a field for custom content.

Topic custom-content plugins Wordpress

Category Web


Maybe you should copy plugin from theme folder to plugin directory and activate it.

EDIT: I'm sorry. I misunderstand you.

I want to have that field optional

It's needed to change theme php code. The task will be easier if you publish this code.

I guess there is registered save_post hook in the theme code. And this hook checks if image is present. But I can't give fine answer because I don't know what is really written in your theme code.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.