document.addEventListener('wpcf7mailsent', function(event) {
jQuery('#form-download').modal();
jQuery('.modal').toggleClass('modal-index');
if ('84' == event.detail.contactFormId) {
var inputs = event.detail.inputs;
var urs = inputs[3].value;
setTimeout(function(){
window.location.href=urs;
}, 3000);
}
}, false);
[tel tel-915 class:input-phone placeholder "Телефон"]
[email email-167 class:input-email placeholder "Email"]
[dynamichidden dynamichidden-635 "http://size.com/wp-content/uploads/2018/12/5.pdf"]
<div id="page" class="single">
<?php
$arg_cat = array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 1,
'exclude' => '',
'include' => '',
'taxonomy' => 'category',
);
$categories = get_categories( $arg_cat );
?>
<article>
<div id="content_box" >
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('g post'); ?>>
<div class="single_page">
<div class="post-content box mark-links entry-content">
<?php the_content(); ?>
</div><!--.post-content box mark-links-->
</div>
</div>
<?php endwhile; ?>
<?php
if( $categories ){
foreach( $categories as $cat ){
$arg_posts = array(
'orderby' => 'name',
'order' => 'ASC',
'posts_per_page' => 3,
'post_type' => 'gallery',
'post_status' => 'publish',
'cat' => $cat->cat_ID,
);
$query = new WP_Query($arg_posts);
?>
<?php if ($query->have_posts() ) ?>
<h2><?php echo $cat->name; ?> </h2>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="main-page-post">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'widgetfull' );?>
</a>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</div>
<?php endwhile; wp_reset_postdata()?>
<?php
}
}
?>
</div>
</article>
$arg_cat = array('orderby' => 'name','order' => 'ASC','hide_empty' => 1,'exclude' => '','include' => '','taxonomy' => 'category');
$arg_posts = array( 'orderby' => 'name', 'order' => 'ASC', 'posts_per_page' => 5, 'post_type' => 'gallery','post_status' => 'publish' );
$categories = get_categories( $arg_cat );
if( $categories ){
foreach($categories as $cat){
$query = new WP_Query($arg_posts);
if ($query->have_posts() )
while ( $query->have_posts() ) {
$query->the_post();
$img_url = get_the_post_thumbnail_url( $query->ID, 'large');
echo '<div class="gallery" ><div class="owl-carousel two gallery"><div class="slide" style="background-image: url('.$img_url.');></div></div></div>';
} wp_reset_postdata();
endif;
}
}
$arg_cat = array('orderby' => 'name','order' => 'ASC','hide_empty' => 1,'exclude' => '','include' => '','taxonomy' => 'category');
$arg_posts = array( 'orderby' => 'name', 'order' => 'ASC', 'posts_per_page' => 5, 'post_type' => 'gallery','post_status' => 'publish' );
$categories = get_categories( $arg_cat );
if( $categories ){
foreach($categories as $cat){
$query = new WP_Query($arg_posts);
if ($query->have_posts() )
while ( $query->have_posts() ) $query->the_post(); $img_url = get_the_post_thumbnail_url( $query->ID, 'large');
echo '<div class="gallery" ><div class="owl-carousel two gallery"><div class="slide" style="background-image: url('.$img_url.');></div></div></div>';
endwhile; wp_reset_postdata();
endif;
}
}