Last active
August 29, 2015 14:05
-
-
Save macbookandrew/eb65e65637d26e32a0f4 to your computer and use it in GitHub Desktop.
WP for Church - Church Pack Pro Events - show six months at a time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* add this below line 146 */ | |
#church-pack .calentries { | |
margin-bottom: 60px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this line below line 106 | |
// Shortcode to embed upcoming events calendar | |
add_shortcode('upcoming_events', 'wpfc_display_upcoming_events_shortcode'); | |
function wpfc_display_upcoming_events_shortcode($atts) { | |
ob_start(); ?> | |
<div id="church-pack" class="calselect"> | |
<?php | |
for ($i = 0; $i <= 5; $i++) { | |
$month = date( 'n' ) + $i; | |
if ($month <= 12) { | |
$year = date( 'Y' ); | |
} else { | |
$month = $month - 12; | |
$year = date ( 'Y' ) + 1; | |
} | |
?> | |
<div class="calHead"> | |
<h2 class="event-month"><?php echo wpfc_monthname( $month , $year ); ?></h2> | |
</div> | |
<div class="calentries"><?php echo wpfc_get_the_calendar( $month , $year ); ?></div> | |
<?php } | |
?> | |
</div> | |
<?php | |
$buffer = ob_get_clean(); | |
return $buffer; | |
} | |
// End Shortcode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
removed navigation to next/previous month from month header