• Resolved eventaus

    (@eventaus)


    Hi,

    I would like to create a Field in the Event Submit Form, that will allow the organiser to select an option from the radio button field but the content won’t be visible in the Single Event Page, but only in the backend or the event-form.

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Rita Kikani

    (@kikanirita)

    Hi @eventaus,

    If you don’t want to show custom fields value, then you need to add below filter in your child-theme functions.php file.

    // hide addtional fields block from single event detail page
    add_filter('event_manager_show_additional_details', 'wpem_hide_additional_field');
    function wpem_hide_additional_field($flag){
    	return false;
    }

    If you need any query then please continue in this thread.

    Thank you.

    Thread Starter eventaus

    (@eventaus)

    Hi,

    How can I hide only one particular additional field from the event page?

    thank you

    Plugin Author Rita Kikani

    (@kikanirita)

    Hi @eventaus,

    To implement this, you need to override template file called content-single-event_listing.php from \wp-content\plugins\wp-event-manager\templates\ to your \wp-content\themes\YOUR_THEME\wp-event-manager\content-single-event_listing.php, then at your theme side file, you need to put condition to hide particular field. You can find code of additional fields in content-single-event_listing.php on line no. 111 around.

    For more info about template file override, you can read this doc : https://wp-eventmanager.com/knowledge-base/template-files-override/

    But, If you don’t want to override template file, then You need to take our upcoming version from git, we already provide filter for this : https://github.com/wpeventmanager/wp-event-manager/issues/1645. If you want to go with this solution then you have to add below filter into your theme/child-theme functions.php file.

    // hide addtional fields block from single event detail page
    add_filter('wpem_single_event_additional_detail', 'wpem_hide_additional_field', 10, 3);
    function wpem_hide_additional_field($flag, $key, $field){
    	if($key == 'YOUR_ADDITONAL_FIELD_KEY_WHICH_YOU_WANT_TO_HIDE'){
    		return false;
    	}else{
    		return true;
    	}
    }

    Thank you.

    Thread Starter eventaus

    (@eventaus)

    Hi,

    Thank you,

    Sorry which part do I copy from the file?

    • This reply was modified 1 year ago by eventaus.
    Plugin Author Rita Kikani

    (@kikanirita)

    Hi @eventaus,

    Let me know that with which solution you want to go, then I will assist you or can share code with you, and more please let me know that meta key of your custom field which you want to hide from single event page.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Create Field IN Editor’ is closed to new replies.