<?php
$velwild= new WP_Query( array( 'category_name' => 'information', 'posts_per_page' => 4, 'order' => 'DESC' , 'post_type' => 'post' ) );
?>
<?php if ($velwild->have_posts()) : ?>
<?php $do_not_duplicate = array(); $i = 0;?>
<?php while ($velwild->have_posts()) : $velwild->the_post();
if ( in_array( get_the_id(), $do_not_duplicate ) ) { continue; }
$do_not_duplicate[$i++] = get_the_id();
?>
<?php if(is_sticky(get_the_id())) { ?>
<div class="amory_sticky">
<?php } ?>
<?php
$postmeta = get_post_custom(get_the_id()); ?>
<?php
if ( has_post_format( 'video' , get_the_id())) { ?>
<div class="slider-category">
<div class="blogpostcategory">
<?php
if(!empty($postmeta["video_post_url"][0])) {
$embed_code = wp_oembed_get(esc_url($postmeta["video_post_url"][0]),array('width'=>300,'height'=>200));
echo $embed_code ;
} ?>
<?php get_template_part('includes/boxes/loopBlogGrid','single'); ?>
</div>
</div>
<?php }
if ( has_post_format( 'link' , get_the_id())) {
$postmeta = get_post_custom(get_the_id());
if(isset($postmeta["link_post_url"][0])){
$link = $postmeta["link_post_url"][0];
} else {
$link = "#";
}
?>
<div class="link-category">
<div class="blogpostcategory">
<?php if(amory_getImage(get_the_id(), 'amory-postBlock') != '') { ?>
<a class="overdefultlink" href="<?php echo esc_url($link) ?>">
<div class="overdefult">
</div>
</a>
<div class="blogimage">
<div class="loading"></div>
<a href="<?php echo esc_url($link) ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php echo amory_getImage(get_the_id(), 'amory-postBlock'); ?></a>
</div>
<?php } ?>
<?php get_template_part('includes/boxes/loopBlogLink','single'); ?>
</div>
</div>
<?php
}
if ( has_post_format( 'quote' , get_the_id())) {?>
<div class="quote-category">
<div class="blogpostcategory">
<?php get_template_part('includes/boxes/loopBlogQuote','single'); ?>
</div>
</div>
<?php
}
?>
<?php if ( has_post_format( 'audio' , get_the_id())) {?>
<div class="blogpostcategory">
<div class="audioPlayerWrap">
<div class="audioPlayer">
<?php
if(isset($postmeta["audio_post_url"][0]))
echo do_shortcode('[soundcloud params="auto_play=false&hide_related=false&visual=true" width="100%" height="150"]'. esc_url($postmeta["audio_post_url"][0]) .'[/soundcloud]') ?>
</div>
</div>
<?php get_template_part('includes/boxes/loopBlogGrid','single'); ?>
</div>
<?php
}
?>
<?php if ( !get_post_format() || has_post_format( 'gallery' , get_the_id())) {?>
<div class="blogpostcategory">
<?php if(amory_getImage(get_the_id(), 'amory-postBlock') != '') { ?>
<a class="overdefultlink" href="<?php the_permalink() ?>">
<div class="overdefult">
</div>
</a>
<div class="blogimage">
<div class="loading"></div>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php echo amory_getImage(get_the_id(), 'amory-postBlock'); ?></a>
</div>
<?php } ?>
<?php get_template_part('includes/boxes/loopBlogGrid','single'); ?>
</div>
<?php } ?>
<?php if(is_sticky()) { ?>
</div>
<?php } ?>
<?php endwhile; ?>
<?php endif; ?>
<div class="pmc-tabs">
<div id="tabs-1" >
<?php get_template_part('category_grid_latest','latest-post'); ?>
</div>
<?php if(is_front_page()) { ?>
<div id="tabs-2" >
<?php get_template_part('category_grid_popular','popular-post'); ?>
</div>
<?php } ?>
</div>
</div>
<div class="infinity-more"><?php esc_html_e('Load more posts','amory'); ?></div>
<div class="navi-grid">
<?php
get_template_part('includes/wp-pagenavi','navigation');
if(function_exists('amory_wp_pagenavi')) { amory_wp_pagenavi(); }
?>
</div>
"use strict";
jQuery(document).ready(function(){
jQuery('.menu li a').click(function() {
var href = jQuery(this).attr('href');
jQuery("html, body").animate({ scrollTop: jQuery(href).offset().top - 90 }, 1000);
return false;
});
});
/* RESPONSIVE VIDEOS */
jQuery(document).ready(function(){
// Target your .container, .wrapper, .post, etc.
jQuery("body, .blogpostcategory").fitVids();
});
/*blog hover image*/
jQuery(document).ready(function(){
jQuery( ".blogpostcategory" ).each(function() {
var img = jQuery(this).find('img');
var height = img.height();
var width = img.width();
var over = jQuery(this).find('a.overdefultlink');
over.css({'width':width+'px', 'height':height+'px'});
var margin_left = parseInt(width)/2 - 18
var margin_top = parseInt(height)/2 - 18
over.css('backgroundPosition', margin_left+'px '+margin_top+'px');
});
});
jQuery.fn.isOnScreen = function(){
var win = jQuery(window);
var viewport = {
top : win.scrollTop(),
left : win.scrollLeft()
};
viewport.right = viewport.left + win.width();
viewport.bottom = viewport.top + win.height();
if(this.offset()){
var bounds = this.offset();
bounds.right = bounds.left + this.outerWidth();
bounds.bottom = bounds.top + this.outerHeight();
return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom));
}
};
/*resp menu*/
jQuery(document).ready(function(){
jQuery('.resp_menu_button').click(function() {
if(jQuery('.event-type-selector-dropdown').attr('style') == 'display: block;')
jQuery('.event-type-selector-dropdown').slideUp({ duration: 500, easing: "easeInOutCubic" });
else
jQuery('.event-type-selector-dropdown').slideDown({ duration: 500, easing: "easeInOutCubic" });
});
jQuery('.event-type-selector-dropdown').click(function() {
jQuery('.event-type-selector-dropdown').slideUp({ duration: 500, easing: "easeInOutCubic" });
});
});
/*add submenu class*/
jQuery(document).ready(function(){
jQuery('.menu > li').each(function() {
if(jQuery(this).find('ul').size() > 0 ){
jQuery(this).addClass('has-sub-menu');
}
});
});
/*animate menu*/
jQuery(document).ready(function(){
jQuery('ul.menu > li').hover(function(){
jQuery(this).find('ul').stop(true,true).fadeIn(300);
},
function () {
jQuery(this).find('ul').stop(true,true).fadeOut(300);
});
});
/*add lightbox*/
jQuery(document).ready(function(){
jQuery(".gallery a").attr("rel", "lightbox[gallery]");
});
jQuery(document).ready(function(){
var menu = jQuery('.mainmenu');
jQuery( window ).scroll(function() {
if(!menu.isOnScreen() && jQuery(this).scrollTop() > 350){
jQuery(".totop").fadeIn(200);
jQuery(".fixedmenu").slideDown(200);}
else{
jQuery(".fixedmenu").slideUp(200);
jQuery(".totop").fadeOut(200);}
});
});
/* lightbox*/
function loadprety(){
jQuery(".gallery a").attr("rel", "lightbox[gallery]").prettyPhoto({theme:'light_rounded',overlay_gallery: false,show_title: false,deeplinking:false});
}
jQuery(document).ready(function(){
jQuery('.gototop').click(function() {
jQuery('html, body').animate({scrollTop:0}, 'medium');
});
});
/*search*/
jQuery(document).ready(function(){
if(jQuery('.widget_search').length>0){
jQuery('#sidebarsearch input').val('Search...');
jQuery('#sidebarsearch input').focus(function() {
jQuery('#sidebarsearch input').val('');
});
jQuery('#sidebarsearch input').focusout(function() {
jQuery('#sidebarsearch input').val('Search...');
});
}
jQuery('.top-search-form i').click(function() {
jQuery('.top-search-form input').slideToggle( "fast", function() {});
});
});
/*tabs*/
jQuery(document).ready(function($){
$(function() {
$( "#pmc-tabs" ).tabs( { selected: 1 });
});
});
jQuery(document).ready(function(){
jQuery('#pmc-tabs li a').click(function() {
jQuery('.content.blog .pmc-tabs').fadeOut(0).fadeIn(0);
});
jQuery('.tab1').click(function() {
jQuery('.infinity-more').show();
});
jQuery('.tab2').click(function() {
jQuery('.infinity-more').hide();
});
});
/*infinity scroll*/
jQuery(document).ready(function($){
$('#tabs-1').infinitescroll({
navSelector : '.wp-pagenavi', // selector for the paged navigation
nextSelector : '.wp-pagenavi a:first', // selector for the NEXT link (to page 2)
itemSelector : '#tabs-1', // selector for all items you'll retrieve
delay: 300,
loading: {
finishedMsg: '',
msgText: '',
speed: 0,
},
}
);
$(window).unbind('.infscr');
$('.infinity-more').click(function(){
$(document).trigger('retrieve.infscr');
$("body, .blogpostcategory").fitVids();
setTimeout(function(){ addthis.toolbox('.addthis_toolbox');}, 1000);
return false;
});
$(document).ajaxError(function(e,xhr,opt){
if (xhr.status == 404) $('.infinity-more').remove();
});
});
var addthis_config = addthis_config||{};
addthis_config.data_track_addressbar = false;
Было: Structural outline
Стало: