<?php /* Template Name: Page 404 */ // Tribe Events hack - create empty post object global $post; if (!isset($post)) { $post = new stdClass(); $post->post_type = 'unknown'; } // End Tribe Events hack get_header(); axiom_show_post_layout(array('layout' => '404'), false); get_footer();
<?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();
function sc_events($atts, $content = null) { if (axiom_sc_in_shortcode_blogger()) { return ''; } extract(shortcode_atts(array("id" => "", "class" => "", "ids" => "", "cat" => "", "count" => "3", "order" => "desc", "animation" => "", "top" => "", "bottom" => "", "left" => "", "right" => "", "col" => "3", "style" => 'classic'), $atts)); $columns = $col; $css = axiom_get_css_position_from_values($top, $right, $bottom, $left); $AXIOM_sc_events_counter = 0; if (empty($id)) { $id = "sc_events_" . str_replace('.', '', mt_rand()); } if (!empty($ids)) { $posts = explode(',', str_replace(' ', '', $ids)); $count = count($posts); } $output = '<div' . ($id ? ' id="' . esc_attr($id) . '"' : '') . ' class="sc_events masonryWrap' . (!empty($class) ? ' ' . esc_attr($class) : '') . '"' . (!axiom_sc_param_is_off($animation) ? ' data-animation="' . esc_attr(axiom_sc_get_animation_classes($animation)) . '"' : '') . ($css != '' ? ' style="' . esc_attr($css) . '"' : '') . '>'; if ($columns < 1) { $columns = 3; } $output .= '<div class="isotope_wrap" data-columns="' . max(1, min(4, $columns)) . '">'; $args = array('post_type' => 'tribe_events', 'orderby' => 'date', 'order' => $order == 'asc' ? 'asc' : 'desc', 'post_status' => 'publish', 'post_password' => '', 'posts_per_page' => esc_attr((int) max(1, min(4, $count))), 'eventDisplay' => 'custom'); if (!empty($cat)) { if ((int) $cat > 0) { $args['tax_query'] = array(array('taxonomy' => 'tribe_events_cat', 'field' => 'id', 'terms' => $cat)); } else { $args['tax_query'] = array(array('taxonomy' => 'tribe_events_cat', 'field' => 'slug', 'terms' => $cat)); } } $query = new WP_Query($args); while ($query->have_posts()) { $query->the_post(); $AXIOM_sc_events_counter++; $args = array('layout' => 'event_classic', 'show' => false, 'number' => $AXIOM_sc_events_counter, 'add_view_more' => false, 'posts_on_page' => $count > 0 ? $count : 1, "posts_visible" => $count, 'thumb_size' => 'events', 'thumb_crop' => true, 'strip_teaser' => false, 'columns_count' => esc_attr((int) $col), 'template_style' => esc_attr($style)); $post_data = axiom_get_post_data($args); //print_r($post_data); $output .= axiom_show_post_layout($args, $post_data); //print_r($output); } wp_reset_postdata(); // Close isotope wrapper $output .= '</div></div>'; return $output; }
<?php /** Template Name: Attachment page */ get_header(); 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_show_post_layout(array('layout' => 'attachment', 'sidebar' => !axiom_sc_param_is_off(axiom_get_custom_option('show_sidebar_main')))); } get_footer();
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; }
<div class="sc_scroll_wrapper swiper-wrapper"> <div class="sc_scroll_slide swiper-slide"> <?php } else { if (axiom_get_template_property('related', 'need_columns')) { ?> <div class="columns_wrap"> <?php } } ?> <?php $i = 0; foreach ($recent_posts as $recent) { $i++; 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')) {
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'; if ($show_filters == 'categories') { // Use categories as filter items $taxonomy = axiom_is_taxonomy(); $cur_term = $taxonomy ? axiom_get_current_term($taxonomy) : 0; $portfolio_parent = $cur_term ? max(0, axiom_get_parent_taxonomy_by_property($cur_term->term_id, 'show_filters', 'yes', true, $taxonomy)) : 0; $args2 = array('type' => !empty($args['post_type']) ? $args['post_type'] : 'post', '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 .= '<a href="#" data-filter="*" class="' . esc_attr($filter_button_classes . ($portfolio_parent == $cur_term->term_id ? ' active' : '')) . '">' . __('All', 'axiom') . '</a>'; foreach ($portfolio_list as $cat) {