Viewing 3 replies - 1 through 3 (of 3 total)
  • Sorry, there’s no option for that at the moment. You could add recurring events to whatever category you like but there’s no automatic option.

    Thread Starter antwoorden

    (@antwoorden)

    Ok, I’ll think of something else… thanks for the reply though.

    Thread Starter antwoorden

    (@antwoorden)

    FOUND A SOLUTION!

    In when-with-recurring.php, find this:

    <script type="text/javascript">
    	//<![CDATA[
    	jQuery(document).ready( function($) {
    		$('#em-recurrence-checkbox').change(function(){
    			if( $('#em-recurrence-checkbox').is(':checked') ){
    				$('.em-recurring-text').show();
    				$('.em-event-text').hide();
    				$("select#recurrence-frequency").val("weekly");
    			}else{
    				$('.em-recurring-text').hide();
    				$('.em-event-text').show();
    			}
    		});
    		$('#em-recurrence-checkbox').trigger('change');
    	});
    	//]]>
    	</script>

    And replace it with this:

    <script type="text/javascript">
    	//<![CDATA[
    	jQuery(document).ready( function($) {
    		$('#select-category').change(function(){
    		if ($("#select-category").val() == "3") {
    				$('.em-recurring-text').show();
    				$('.em-event-text').hide();
    $('input[name=recurring]').val('1');
    			}else{
    				$('.em-recurring-text').hide();
    				$('.em-event-text').show();
    $('input[name=recurring]').val('0');
    			}
    		});
    		$('#select-category').trigger('change');
    	});
    	//]]>
    	</script>

    When the category with ID 3 is selected, recurring event will be triggered. This way you don’t need to see a checkbox for recurring events anymore, so change this:

    <p><?php _e('This is a recurring event.', 'dbem'); ?> <input type="checkbox" id="em-recurrence-checkbox" name="recurring" value="1" <?php if($EM_Event->is_recurring()) echo 'checked' ?> /></p>

    into this:

    <input type="hidden" id="em-recurrence-checkbox" name="recurring" value="0" <?php if($EM_Event->is_recurring()) echo 'checked' ?> />

    Now you could move the category selector more to the top, by editing event-editor.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Recurring event category’ is closed to new replies.