09 BB Child Theme functions.php mods
// Function to format output of Pods Magic Tag @post_date
function my_date($input_date) {
return date(„d.m.Y“, strtotime($input_date));
}
//Add Shortcode for Zeno Font Resizer PlugIn (see https://bit.ly/2szwANq)
function zeno_font_resizer_place_shortcode() {
return zeno_font_resizer_place( false );
}
add_shortcode(‚zeno_font_resizer‘, ‚zeno_font_resizer_place_shortcode‘);
/* Advanced Query Parameters filtering for UABB Posts module for BB Themer part linked on front page */
function match_today_4_posts_uabb_blog_posts_query_args( $args, $settings ) {
// Give an HTML id and check it before modifying arguments so that it will be applied to all blog post modules on the site.
if ( $settings->id == ‚match_today_4_posts‘ ) {
$args[’nopaging‘] = false;
$args[‚posts_per_page‘] = ‚4‘;
$args[‚meta_query‘] =
array(
‚key‘ => ’startdate‘,
‚compare‘ => ‚>=‘, ‚value‘ => date( „Ymd“ ),
‚type‘ => ‚DATE‘
);
}
return $args;
}
add_filter( ‚uabb_blog_posts_query_args‘, ‚match_today_4_posts_uabb_blog_posts_query_args‘, 20, 2 );
/* Advanced Query Parameters filtering for UABB Posts module for BB Themer part linked on front page */
function match_tourenberichte_4_posts_uabb_blog_posts_query_args( $args, $settings ) {
// Give an HTML id and check it before modifying arguments so that it will be applied to all blog post modules on the site.
if ( $settings->id == ‚match_tourenberichte_4_posts‘ ) {
$args[’nopaging‘] = false;
$args[‚posts_per_page‘] = ‚4‘;
$args[‚meta_query‘] =
array(
‚key‘ => ‚bericht_ok‘,
‚compare‘ => ‚=‘, ‚value‘ => „1“,
‚type‘ => ‚BOOLEAN‘
);
}
return $args;
}
add_filter( ‚uabb_blog_posts_query_args‘, ‚match_tourenberichte_4_posts_uabb_blog_posts_query_args‘, 20, 2 );
/* Advanced Query Parameters filtering for UABB Posts module for BB Themer part linked on Jahresprogramm */
function match_today_20_posts_uabb_blog_posts_query_args( $args, $settings ) {
// Give an HTML id and check it before modifying arguments so that it will be applied to all blog post modules on the site.
if ( $settings->id == ‚match_today_20_posts‘ ) {
$args[’nopaging‘] = false;
$args[‚posts_per_page‘] = ’20‘;
$args[‚meta_query‘] =
array(
‚key‘ => ’startdate‘,
‚compare‘ => ‚>=‘, ‚value‘ => date( „Ymd“ ),
‚type‘ => ‚DATE‘
);
}
return $args;
}
add_filter( ‚uabb_blog_posts_query_args‘, ‚match_today_20_posts_uabb_blog_posts_query_args‘, 20, 2 );
/* Advanced Query Parameters filtering for UABB Posts module for BB Themer part linked on Jahresprogramm */
function match_tourenberichte_20_posts_uabb_blog_posts_query_args( $args, $settings ) {
// Give an HTML id and check it before modifying arguments so that it will be applied to all blog post modules on the site.
if ( $settings->id == ‚match_tourenberichte_20_posts‘ ) {
$args[’nopaging‘] = false;
$args[‚posts_per_page‘] = ’20‘;
$args[‚meta_query‘] =
array(
‚key‘ => ‚bericht_ok‘,
‚compare‘ => ‚=‘, ‚value‘ => „1“,
‚type‘ => ‚BOOLEAN‘
);
}
return $args;
}
add_filter( ‚uabb_blog_posts_query_args‘, ‚match_tourenberichte_20_posts_uabb_blog_posts_query_args‘, 20, 2 );
