Viewing 1 replies (of 1 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    Hi, I just created a snippet for another thread, you can modify the headers via JS or PHP in WPFC 1.2, as per the FC docs you referred to. Here’s both ways:

    //This snippet will modify the header via JS
    function my_wp_fullcalendar_header_yearskip(){
    	?>
        <script type="text/javascript">
        jQuery(document).on('wpfc_fullcalendar_args', function( e, options ){
        	options.header.left = 'prevYear,prev,next,nextYear today';
        });
        </script>
        <?php
    }
    add_action('wp_footer','my_wp_fullcalendar_header_yearskip', 1);
    
    //This snippet modifies header of calendar, via PHP
    function my_wpfc_calendar_header_vars( $header ){
    	$header->left = 'prevYear,prev,next,nextYear today';
    	return $header;
    }
    add_filter('wpfc_calendar_header_vars', 'my_wpfc_calendar_header_vars');
Viewing 1 replies (of 1 total)

The topic ‘Changing header layout’ is closed to new replies.