$('.num').each(function() {
$({ value: 0 }).animate({ value: +$(this).text() }, {
duration: 1000,
easing: 'linear',
step: val => $(this).text(val.toFixed(2)),
});
});
function lvl_home_post_slides( $atts ) {
...
$options = array(
'post_type' => $args['type'],
'posts_per_page' => $args['posts'],
'post_status' => 'publish',
'orderby' => array(
'post_date' => 'DESC',
'meta_value' => 'ASC'
),
'meta_key' => 'event_date'
);
$query = new WP_Query( $options );
...
}
add_shortcode( 'portfolio', 'call_shortcode_portfolio' );
function call_shortcode_portfolio( $atts, $content = '' ) {
$atts = shortcode_atts( array( 'id' => null ), $atts );
$query = new WP_Query( array( 'post_type' => 'your_custom_post_type', 'p' => intval( $atts['id'] ) ) );
}
$(document).ready(function() {
$("a.scrollto").click(function () {
elementClick = $(this).attr("href")
destination = $(elementClick).offset().top;
$("html:not(:animated),body:not(:animated)").animate({scrollTop: destination - *высота шапки*}, 1100);
return false;
});
});
scrollto