| Server IP : 172.67.201.108 / Your IP : 216.73.216.11 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/home2/domains/siparent/wp-content/themes/JSMT-Genesis-1.1/ |
Upload File : |
<style>
#evcal_calendar_the_featured .evcal_list_a{
background-color: #fdf5e2 !important;
}
</style>
<?php
/*
**
* JSMT Media Front Page Template - Mike Tedesco
*/
//add front page specific styles & scripts
/*add_action( 'wp_enqueue_scripts', 'jsmt_enqueue_scripts_home' );
function jsmt_enqueue_scripts_home() {
wp_enqueue_script( 'jsmt-homepage-scripts', get_stylesheet_directory_uri() . "/js/front-page.js", array( 'jquery' ), CHILD_THEME_VERSION, true );
}*/
add_action( 'genesis_meta', 'jsmt_front_page_genesis_meta' );
function jsmt_front_page_genesis_meta() {
if ( is_active_sidebar( 'front-page-1' ) || is_active_sidebar( 'front-page-2' ) || is_active_sidebar( 'front-page-3' )) {
//* Add front-page body class
add_filter( 'body_class', 'jsmt_body_class' );
function jsmt_body_class( $classes ) {
$classes[] = 'front-page';
return $classes;
}
//* Force full width content layout
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
//* Remove breadcrumbs
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
//* Add widgets on front page
add_action( 'genesis_after_header', 'jsmt_front_page_widgets' );
//* Remove the default Genesis loop
remove_action( 'genesis_loop', 'genesis_do_loop' );
//* Remove .site-inner
add_filter( 'genesis_markup_site-inner', '__return_null' );
add_filter( 'genesis_markup_content-sidebar-wrap_output', '__return_false' );
add_filter( 'genesis_markup_content', '__return_null' );
}
}
//add front page widgets
function jsmt_front_page_widgets(){
genesis_widget_area( 'front-page-5', array(
'before' => '<div class="front-page-5"><div class="wrap"><div class="flexbox">',
'after' => '</div></div></div>',
) );
genesis_widget_area( 'front-page-4', array(
'before' => '<div class="front-page-5"><div class="wrap"><div class="flexbox">',
'after' => '</div></div></div>',
) );
// Call the home grid function
home_grid();
genesis_widget_area( 'front-page-2', array(
'before' => '<div class="front-page-2"><div class="wrap">',
'after' => '</div></div>',
) );
$args = array(
'shortcode_variable_name'=> 'shortcode_variable_value',
'event_type'=>'7040',
'show_et_ft_img'=>'yes',
'number_of_months'=>'2',
);
echo '<div class="wrap">';
add_eventon($args);
echo "</div>";
genesis_widget_area( 'front-page-3', array(
'before' => '<div class="front-page-3"><div class="wrap"><div class="flexbox">',
'after' => '</div></div></div>',
) );
//blog_grid();
}
add_action("genesis_after_header","jsmt_front_page_widgets");
function events() {
global $post;
$today = date('Ymd');
$posts = get_posts(array(
'post_type' => 'events',
'posts_per_page'=> -1,
'order' => 'ASC',
'orderby' => 'meta_value',
'meta_key' => 'date',
'meta_query' => array(
array(
'key' => 'date',
'compare' => '>=',
'value' => $today,
),
),
));
if( function_exists('add_eventon')) {
echo '<h1 style="font-weight:bold;">Featured Events</h1>';
$args = array(
'shortcode_variable_name'=> 'shortcode_variable_value',
'event_type'=>'7036',
'show_et_ft_img'=>'yes',
'show_upcoming'=>'1',
'number_of_months'=>'3',
'cal_id'=>'the_featured'
);
add_eventon($args);
}
$events = get_posts( array(
'posts_per_page' => -1,
'post_type' => 'events',
'tax_query' => array(
array(
'taxonomy' => 'event_category',
'field' => 'slug',
'terms' => 'featured',
'operator' => 'IN',
),
),
'order' => 'ASC',
'orderby' => 'meta_value',
'meta_key' => 'date',
));
if($posts) {
//Current Month & Year
$current_year = date('Y');
$current_month = date('F');
// Get Event Month & Year
$datetime_string = get_field('date', $post);
$event_month = date('F', strtotime($datetime_string));
$count_posts = wp_count_posts( 'events' )->publish;
echo '<div class="buttons" style="text-align:center"><a href="/upcoming-events" class="button">View All '.$count_posts.' Events</a> <a href="/events-this-week" target="_blank" class="button">Events This Week</a> <a href="/events-this-weekend" target="_blank" class="button">Events This Weekend</a></div>';
echo '<div class="upcoming-events">';
//echo do_shortcode( '[searchandfilter fields="date"]' );
foreach( $posts as $post ) {
// Get Event Month & Year
$datetime_string = get_field('date', $post);
$event_month = date('F', strtotime($datetime_string));
$event_year = date('Y', strtotime($datetime_string));
$day = date('d', strtotime($datetime_string));
//Other Fields
$title = get_the_title($post->ID);
$location = get_field('location', $post);
$link = get_permalink($post);
//if($current_year == $event_year && $current_month == $event_month) {
echo '<div class="event">';
echo '<div class="flexbox">';
echo '<div class="flexcol">';
echo '<div class="event-date"><span class="day">'.$day.'</span> '.$event_month.'</div>';
echo '</div>';
echo '<div class="flexcol">';
echo '<h3 class="event-title"><a href="'.$link.'">'.$title.'</a></h3>';
echo '<div class="location">'.$location.'</div>';
echo '</div>';
echo '<div class="flexcol">';
echo '<a href="'.$link.'" class="button">View Details</a>';
echo '</div>';
echo '</div>';
echo '</div>';
//}
}
echo '<a href="#" id="loadMore" class="button">See More</a>';
echo '</div>';
?>
<script>
jQuery(function() {
jQuery(".upcoming-events .event").slice(0,3).show();
jQuery("#loadMore").on('click', function (e) {
e.preventDefault();
jQuery(".upcoming-events .event:hidden").slice(0, 3).slideDown();
if (jQuery(".upcoming-events .event:hidden").length == 0) {
jQuery("#loadMore").fadeOut('slow');
}
});
});
</script>
<style>
.upcoming-events .event {
display:none;
}
</style>
<?php
}
}
//run the genesis loop
genesis();