<div id="primary" class="vce-main-content"> <div class="main-box"> <div class="main-box-head"> <h1 class="main-box-title"><?php the_title(); ?> </h1> </div> <div class="main-box-inside"> <?php $meta = vce_get_page_meta(get_the_ID(), 'authors'); $ids = get_users(array('fields' => 'ID', 'who' => 'authors', 'exclude' => explode(',', $meta['exclude']))); $users_with_posts = array_filter(count_many_users_posts($ids, 'post')); $author_args = array('include' => array_keys($users_with_posts), 'order' => $meta['order'], 'orderby' => $meta['orderby']); $authors = get_users($author_args); ?> <?php foreach ($authors as $author) { ?> <div class="vce-author-card"> <div class="data-image"> <?php
?> <?php if ($vce_sidebar_opts['use_sidebar'] == 'left') { get_sidebar(); } ?> <div id="primary" class="vce-main-content"> <?php global $wp_query; ?> <?php $modules = vce_get_page_meta(get_the_ID(), 'modules'); ?> <?php if (!empty($modules)) { ?> <?php foreach ($modules as $k => $mod) { ?> <?php $mod = vce_define_module_type($mod); $mod['curr_page'] = $curr_page; $apply_paged = $curr_page > 1 && $k == count($modules) - 1 ? $curr_page : false; ?>
function vce_page_content_metabox($object, $box) { $vce_meta = vce_get_page_meta($object->ID); ?> <p><strong><?php _e('Display page content:', THEME_SLUG); ?> </strong></p> <label><input type="radio" name="vce[display_content][position]" value="up" <?php checked('up', $vce_meta['display_content']['position']); ?> /> <?php _e('Above modules', THEME_SLUG); ?> </label><br/> <label><input type="radio" name="vce[display_content][position]" value="down" <?php checked('down', $vce_meta['display_content']['position']); ?> /> <?php _e('Below modules', THEME_SLUG); ?> </label><br/> <label><input type="radio" name="vce[display_content][position]" value="0" <?php checked('0', $vce_meta['display_content']['position']); ?> /> <?php _e('Do not display', THEME_SLUG); ?> </label><br/><br/> <p><strong><?php _e('Style:', THEME_SLUG); ?> </strong></p> <label><input type="radio" name="vce[display_content][style]" value="wrap" <?php checked('wrap', $vce_meta['display_content']['style']); ?> /> <?php _e('Wrapped in box', THEME_SLUG); ?> </label><br/> <label><input type="radio" name="vce[display_content][style]" value="unwrap" <?php checked('unwrap', $vce_meta['display_content']['style']); ?> /> <?php _e('Unwrapped (transparent background)', THEME_SLUG); ?> </label><br/> <p><strong><?php _e('Width:', THEME_SLUG); ?> </strong></p> <label><input type="radio" name="vce[display_content][width]" value="container" <?php checked('container', $vce_meta['display_content']['width']); ?> /> <?php _e('Container/page width', THEME_SLUG); ?> </label><br/> <label><input type="radio" name="vce[display_content][width]" value="full" <?php checked('full', $vce_meta['display_content']['width']); ?> /> <?php _e('Full/browser width', THEME_SLUG); ?> </label><br/><br/> <p class="description"><?php _e('Manage display options for content/editor on this page', THEME_SLUG); ?> </p> <?php }
function vce_get_fa_home_args() { $args = array('use_fa' => false); //Check home page featured area options $obj = get_queried_object(); $meta = vce_get_page_meta($obj->ID); $fa_layout = $meta['fa_layout']; if ($fa_layout) { $q_args['post_type'] = 'post'; $q_args['ignore_sticky_posts'] = 1; if (!empty($meta['fa_manual'])) { $q_args['posts_per_page'] = absint(count($meta['fa_manual'])); $q_args['orderby'] = 'post__in'; $q_args['post__in'] = $meta['fa_manual']; $q_args['post_type'] = array_keys(get_post_types(array('public' => true))); //support all existing public post types } else { $num_posts = absint($meta['fa_limit']); $q_args['posts_per_page'] = $num_posts; $q_args['orderby'] = $meta['fa_order']; if ($q_args['orderby'] == 'views' && function_exists('ev_get_meta_key')) { $q_args['orderby'] = 'meta_value_num'; $q_args['meta_key'] = ev_get_meta_key(); } if ($q_args['orderby'] == 'comments_number') { $q_args['orderby'] = 'comment_count'; } if ($meta['fa_time']) { $q_args['date_query'] = array('after' => date('Y-m-d', strtotime($meta['fa_time']))); } if (!empty($meta['fa_cat'])) { if ($meta['fa_cat_child']) { $child_cat_temp = array(); foreach ($meta['fa_cat'] as $parent) { $child_cats = get_categories(array('child_of' => $parent)); if (!empty($child_cats)) { foreach ($child_cats as $child) { $child_cat_temp[] = $child->term_id; } } } $meta['fa_cat'] = array_merge($meta['fa_cat'], $child_cat_temp); } $q_args['category__in'] = $meta['fa_cat']; } if (!empty($meta['fa_tag'])) { $q_args['tag_slug__in'] = explode(',', $meta['fa_tag']); } } $args['fa_posts'] = new WP_Query($q_args); if (!is_wp_error($args['fa_posts']) && !empty($args['fa_posts'])) { $num_posts = count($args['fa_posts']->posts); $fa_layout = explode("_", $fa_layout); $args['both'] = count($fa_layout) == 2 ? true : false; $args['full'] = $fa_layout[0] == 'full' ? true : false; $args['full_slider'] = $num_posts > 1 && !isset($fa_layout[1]) && $fa_layout[0] == 'full' ? true : false; $args['grid'] = in_array('grid', $fa_layout) ? true : false; $args['use_fa'] = true; if ($meta['fa_exclude']) { global $vce_fa_home_posts; $vce_fa_home_posts = array(); foreach ($args['fa_posts']->posts as $p) { $vce_fa_home_posts[] = $p->ID; } } } } //print_r($q_args); return $args; }