Пример #1
0
<?php

/*
Template Name: Team member
*/
get_header();
$single_style = 'single-team';
//axiom_get_custom_option('single_style');
while (have_posts()) {
    the_post();
    // Move axiom_set_post_views to the javascript - counter will work under cache system
    if (axiom_get_custom_option('use_ajax_views_counter') == 'no') {
        axiom_set_post_views(get_the_ID());
    }
    //axiom_sc_clear_dedicated_content();
    axiom_show_post_layout(array('layout' => $single_style, 'sidebar' => !axiom_sc_param_is_off(axiom_get_custom_option('show_sidebar_main')), 'content' => axiom_get_template_property($single_style, 'need_content'), 'terms_list' => axiom_get_template_property($single_style, 'need_terms')));
}
get_footer();
Пример #2
0
function axiom_sc_blogger($atts, $content = null)
{
    if (axiom_sc_in_shortcode_blogger(true)) {
        return '';
    }
    extract(axiom_sc_html_decode(shortcode_atts(array("style" => "regular", "filters" => "no", "post_type" => "post", "ids" => "", "cat" => "", "count" => "3", "columns" => "", "offset" => "", "orderby" => "date", "order" => "desc", "only" => "no", "descr" => "", "readmore" => "", "loadmore" => "no", "location" => "default", "dir" => "horizontal", "hover" => axiom_get_theme_option('hover_style'), "hover_dir" => axiom_get_theme_option('hover_dir'), "scroll" => "no", "controls" => "no", "rating" => "no", "info" => "yes", "links" => "yes", "date_format" => "", "id" => "", "class" => "", "css" => "", "animation" => "", "width" => "", "height" => "", "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts)));
    $css .= axiom_get_css_position_from_values($top, $right, $bottom, $left, $width, $height);
    $width = axiom_prepare_css_value($width);
    $height = axiom_prepare_css_value($height);
    global $post, $AXIOM_GLOBALS;
    $AXIOM_GLOBALS['sc_blogger_busy'] = true;
    $AXIOM_GLOBALS['sc_blogger_counter'] = 0;
    if (empty($id)) {
        $id = "sc_blogger_" . str_replace('.', '', mt_rand());
    }
    if ($style == 'date' && empty($date_format)) {
        $date_format = 'd.m+Y';
    }
    if (!empty($ids)) {
        $posts = explode(',', str_replace(' ', '', $ids));
        $count = count($posts);
    }
    if ($descr == '') {
        $descr = axiom_get_custom_option('post_excerpt_maxlength' . ($columns > 1 ? '_masonry' : ''));
    }
    if (!axiom_sc_param_is_off($scroll)) {
        axiom_enqueue_slider();
        if (empty($id)) {
            $id = 'sc_blogger_' . str_replace('.', '', mt_rand());
        }
    }
    $class = apply_filters('axiom_filter_blog_class', 'sc_blogger' . ' layout_' . esc_attr($style) . ' template_' . esc_attr(axiom_get_template_name($style)) . (!empty($class) ? ' ' . esc_attr($class) : '') . ' ' . esc_attr(axiom_get_template_property($style, 'container_classes')) . ' sc_blogger_' . ($dir == 'vertical' ? 'vertical' : 'horizontal') . (axiom_sc_param_is_on($scroll) && axiom_sc_param_is_on($controls) ? ' sc_scroll_controls sc_scroll_controls_type_top sc_scroll_controls_' . esc_attr($dir) : '') . ($descr == 0 ? ' no_description' : ''), array('style' => $style, 'dir' => $dir, 'descr' => $descr));
    $container = apply_filters('axiom_filter_blog_container', axiom_get_template_property($style, 'container'), array('style' => $style, 'dir' => $dir));
    $container_start = $container_end = '';
    if (!empty($container)) {
        $container = explode('%s', $container);
        $container_start = !empty($container[0]) ? $container[0] : '';
        $container_end = !empty($container[1]) ? $container[1] : '';
    }
    $output = (strpos($style, 'list') !== 'FALSE' ? '<ul' : '<div') . ($id ? ' id="' . esc_attr($id) . '"' : '') . ' class="' . esc_attr($class) . '"' . ($css != '' ? ' style="' . esc_attr($css) . '"' : '') . (!axiom_sc_param_is_off($animation) ? ' data-animation="' . esc_attr(axiom_sc_get_animation_classes($animation)) . '"' : '') . '>' . $container_start . ($dir == 'horizontal' && $columns > 1 && axiom_get_template_property($style, 'need_columns') ? '<div class="columns_wrap">' : '') . (axiom_sc_param_is_on($scroll) ? '<div id="' . esc_attr($id) . '_scroll" class="sc_scroll sc_scroll_' . esc_attr($dir) . ' sc_slider_noresize swiper-slider-container scroll-container"' . ' style="' . ($dir == 'vertical' ? 'height:' . ($height != '' ? $height : "230px") . ';' : 'width:' . ($width != '' ? $width . ';' : "100%;")) . '"' . '>' . '<div class="sc_scroll_wrapper swiper-wrapper">' . '<div class="sc_scroll_slide swiper-slide">' : '');
    if (axiom_get_template_property($style, 'need_isotope')) {
        if (!axiom_sc_param_is_off($filters)) {
            $output .= '<div class="isotope_filters"></div>';
        }
        if ($columns < 1) {
            $columns = axiom_substr($style, -1);
        }
        $output .= '<div class="isotope_wrap" data-columns="' . max(1, min(4, $columns)) . '">';
    }
    $args = array('post_status' => current_user_can('read_private_pages') && current_user_can('read_private_posts') ? array('publish', 'private') : 'publish', 'posts_per_page' => $count, 'ignore_sticky_posts' => 1, 'order' => $order == 'asc' ? 'asc' : 'desc', 'orderby' => 'date');
    if ($offset > 0 && empty($ids)) {
        $args['offset'] = $offset;
    }
    $args = axiom_query_add_sort_order($args, $orderby, $order);
    if (!axiom_sc_param_is_off($only)) {
        $args = axiom_query_add_filters($args, $only);
    }
    $args = axiom_query_add_posts_and_cats($args, $ids, $post_type, $cat);
    $query = new WP_Query($args);
    $flt_ids = array();
    while ($query->have_posts()) {
        $query->the_post();
        $AXIOM_GLOBALS['sc_blogger_counter']++;
        $args = array('layout' => $style, 'show' => false, 'number' => $AXIOM_GLOBALS['sc_blogger_counter'], 'add_view_more' => false, 'posts_on_page' => $count > 0 ? $count : $query->found_posts, "location" => $location, "descr" => $descr, "readmore" => $readmore, "loadmore" => $loadmore, "reviews" => axiom_sc_param_is_on($rating), "dir" => $dir, "scroll" => axiom_sc_param_is_on($scroll), "info" => axiom_sc_param_is_on($info), "links" => axiom_sc_param_is_on($links), "orderby" => $orderby, "columns_count" => $columns, "date_format" => $date_format, 'strip_teaser' => false, 'content' => axiom_get_template_property($style, 'need_content'), 'terms_list' => true, 'filters' => axiom_sc_param_is_off($filters) ? '' : $filters, 'hover' => $hover, 'hover_dir' => $hover_dir);
        $post_data = axiom_get_post_data($args);
        $output .= axiom_show_post_layout($args, $post_data);
        if (!axiom_sc_param_is_off($filters)) {
            if ($filters == 'tags') {
                // Use tags as filter items
                if (!empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms)) {
                    foreach ($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms as $tag) {
                        $flt_ids[$tag->term_id] = $tag->name;
                    }
                }
            }
        }
    }
    wp_reset_postdata();
    // Close isotope wrapper
    if (axiom_get_template_property($style, 'need_isotope')) {
        $output .= '</div>';
    }
    // Isotope filters list
    if (!axiom_sc_param_is_off($filters)) {
        $filters_list = '';
        if ($filters == 'categories') {
            // Use categories as filter items
            $taxonomy = axiom_get_taxonomy_categories_by_post_type($post_type);
            $portfolio_parent = $cat ? max(0, axiom_get_parent_taxonomy_by_property($cat, 'show_filters', 'yes', true, $taxonomy)) : 0;
            $args2 = array('type' => $post_type, 'child_of' => $portfolio_parent, 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 1, 'hierarchical' => 0, 'exclude' => '', 'include' => '', 'number' => '', 'taxonomy' => $taxonomy, 'pad_counts' => false);
            $portfolio_list = get_categories($args2);
            if (count($portfolio_list) > 0) {
                $filters_list .= '<a href="#" data-filter="*" class="theme_button active">' . __('All', 'axiom') . '</a>';
                foreach ($portfolio_list as $cat) {
                    $filters_list .= '<a href="#" data-filter=".flt_' . esc_attr($cat->term_id) . '" class="theme_button">' . $cat->name . '</a>';
                }
            }
        } else {
            // Use tags as filter items
            if (count($flt_ids) > 0) {
                $filters_list .= '<a href="#" data-filter="*" class="theme_button active">' . __('All', 'axiom') . '</a>';
                foreach ($flt_ids as $flt_id => $flt_name) {
                    $filters_list .= '<a href="#" data-filter=".flt_' . esc_attr($flt_id) . '" class="theme_button">' . $flt_name . '</a>';
                }
            }
        }
        if ($filters_list) {
            $output .= '<script type="text/javascript">' . 'jQuery(document).ready(function () {' . 'jQuery("#' . esc_attr($id) . ' .isotope_filters").append("' . addslashes($filters_list) . '");' . '});' . '</script>';
        }
    }
    $output .= (axiom_sc_param_is_on($scroll) ? '</div></div><div id="' . esc_attr($id) . '_scroll_bar" class="sc_scroll_bar sc_scroll_bar_' . esc_attr($dir) . ' ' . esc_attr($id) . '_scroll_bar"></div></div>' . (!axiom_sc_param_is_off($controls) ? '<div class="sc_scroll_controls_wrap"><a class="sc_scroll_prev" href="#"></a><a class="sc_scroll_next" href="#"></a></div>' : '') : '') . ($dir == 'horizontal' && $columns > 1 && axiom_get_template_property($style, 'need_columns') ? '</div>' : '') . $container_end . (strpos($style, 'list') !== 'FALSE' ? '</ul>' : '</div>');
    // Add template specific scripts and styles
    do_action('axiom_action_blog_scripts', $style);
    $AXIOM_GLOBALS['sc_blogger_busy'] = false;
    if (strpos($style, 'accordion') !== 'FALSE') {
        axiom_enqueue_script('jquery-ui-accordion', false, array('jquery', 'jquery-ui-core'), null, true);
    }
    return apply_filters('axiom_shortcode_output', $output, 'trx_blogger', $atts, $content);
}
Пример #3
0
            axiom_show_post_layout(array('layout' => 'related', 'number' => $i, 'add_view_more' => false, 'posts_on_page' => axiom_get_custom_option('post_related_count'), 'columns_count' => $columns, 'thumb_size' => 'related_' . max(1, min(4, count($recent_posts))), 'strip_teaser' => false, 'sidebar' => !axiom_sc_param_is_off(axiom_get_custom_option('show_sidebar_main')), 'content' => axiom_get_template_property('related', 'need_content'), 'terms_list' => axiom_get_template_property('related', 'need_terms')), null, $recent);
        }
        ?>
					
			<?php 
        if ($columns < 2) {
            ?>
						</div>
				   </div>
					<div id="related_scroll_bar" class="sc_scroll_bar sc_scroll_bar_horizontal related_scroll_bar"></div>
				</div>
				<div class="sc_scroll_controls_wrap"><a class="sc_scroll_prev" href="#"></a><a class="sc_scroll_next" href="#"></a></div>
			</div>
			<?php 
        } else {
            if (axiom_get_template_property('related', 'need_columns')) {
                ?>
				</div>
			<?php 
            }
        }
        ?>

			<?php 
        if ($need_wrap) {
            axiom_close_wrapper();
        }
        ?>

		</section>
		<?php 
Пример #4
0
 function axiom_callback_view_more_posts()
 {
     global $_REQUEST, $post, $wp_query;
     if (!wp_verify_nonce($_REQUEST['nonce'], 'ajax_nonce')) {
         die;
     }
     $response = array('error' => '', 'data' => '', 'no_more_data' => 0);
     $page = $_REQUEST['page'];
     $args = unserialize(stripslashes($_REQUEST['data']));
     $vars = unserialize(stripslashes($_REQUEST['vars']));
     if ($page > 0 && is_array($args) && is_array($vars)) {
         extract($vars);
         $args['page'] = $page;
         $args['paged'] = $page;
         $args['ignore_sticky_posts'] = 1;
         if (!isset($wp_query)) {
             $wp_query = new WP_Query($args);
         } else {
             query_posts($args);
         }
         $per_page = count($wp_query->posts);
         $response['no_more_data'] = $page >= $wp_query->max_num_pages;
         $post_number = 0;
         $response['data'] = '';
         $flt_ids = array();
         while (have_posts()) {
             the_post();
             $post_number++;
             $post_args = array('layout' => $vars['blog_style'], 'number' => $post_number, 'add_view_more' => false, 'posts_on_page' => $per_page, 'columns_count' => $vars['columns_count'], 'content' => axiom_get_template_property($vars['blog_style'], 'need_content'), 'terms_list' => !axiom_sc_param_is_off($vars['filters']) || axiom_get_template_property($vars['blog_style'], 'need_terms'), 'strip_teaser' => false, 'parent_tax_id' => $vars['parent_tax_id'], 'sidebar' => $vars['show_sidebar'] != 'hide', 'filters' => $vars['filters'], 'hover' => $vars['hover'] ? $vars['hover'] : 'square effect_dir', 'hover_dir' => $vars['hover_dir'] ? $vars['hover_dir'] : 'left_to_right', 'show' => false);
             $post_data = axiom_get_post_data($post_args);
             $response['data'] .= axiom_show_post_layout($post_args, $post_data);
             if ($vars['filters'] == 'tags') {
                 if (!empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms)) {
                     foreach ($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms as $tag) {
                         $flt_ids[$tag->term_id] = $tag->name;
                     }
                 }
             }
         }
         $response['filters'] = $flt_ids;
     } else {
         $response['error'] = __('Wrong query arguments', 'axiom');
     }
     echo json_encode($response);
     die;
 }
Пример #5
0
    axiom_show_post_layout($post_args, $post_data);
    if ($show_filters == 'tags') {
        // Use tags as filter items
        if (!empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms)) {
            foreach ($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms as $tag) {
                $flt_ids[$tag->term_id] = $tag->name;
            }
        }
    }
}
if (axiom_get_template_property($blog_style, 'need_isotope')) {
    ?>
	</div> <!-- /.isotope_wrap -->
	<?php 
}
if (axiom_get_template_property($blog_style, 'need_columns') && $blog_columns > 1) {
    ?>
	</div> <!-- /.columns_wrap -->
	<?php 
}
echo $container_end;
if (!$post_number) {
    if (is_search()) {
        axiom_show_post_layout(array('layout' => 'no-search'), false);
    } else {
        axiom_show_post_layout(array('layout' => 'no-articles'), false);
    }
} else {
    // Isotope filters list
    $filters = '';
    $filter_button_classes = 'isotope_filters_button';