Home Forums Event Espresso Premium Auto-Set Post For A New Event To YES?

Auto-Set Post For A New Event To YES?

Posted: June 12, 2014 at 6:21 am


June 12, 2014 at 6:21 am

Is there a way to have a new events created set YES for “Add/Update post for this event?”



  • Support Staff

June 12, 2014 at 10:05 am

Hi Julie,

Currently there is no way within Event Espresso to alter this default without modifying core.

However, with a small edit you add a filter to this to allow you to do so.

If you open up event-espresso/includes/admin-files/event-management/new_event_post.php

On line 11 you’ll find:

<?php echo select_input('create_post', $values, 'N'); ?> 

Change that to:

$create_post = apply_filters('filter_hook_espresso_default_create_post_option', 'N');
echo select_input('create_post', $values, $create_post); 

So it will look something like this –

In itself that doesn’t actually do anything. But then if we add something like this:

add_filter('filter_hook_espresso_default_create_post_option', 'ee_return_create_post');
function ee_return_create_post(){
	return 'Y';

To our themes functions.php file we can alter the default to our liking. ‘Y’/’N’.

I have submitted a request for this filter to be included within the next version of Event Espresso so therefore this modification should continue to work after EE updates.


  • Support Staff

June 12, 2014 at 10:46 am

@josh pointed out that this could also be achieved with jQuery if you are unsure of the above.

You can add:

add_action('action_hook_espresso_new_event_right_column_bottom', 'my_custom_post_option_default_switcher');

function my_custom_post_option_default_switcher(){
jQuery(document).ready(function($) {

To your themes functions.php file in place of the above. The result should be the same so it depends on which you prefer.

Hope that helps.


June 12, 2014 at 4:23 pm

Ah thank you! Yes the JQuery solution is a much better long term solution. Thanks again!


June 13, 2014 at 4:15 am

Hi Julie,

Has this resolved your query? If so please mark the thread as resolved (top right area).


The support post ‘Auto-Set Post For A New Event To YES?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: closed

Updated by  Dean 6 years, 7 months ago ago

Topic Tags


This topic is: resolved
Do NOT follow this link or you will be banned from the site!