</ul> <p class="fr"><?php echo date('l, '); echo date(get_option('date_format')); ?> </p> </div> </div> <?php get_template_part('info/featured'); ?> <?php get_template_part('info/latest-posts'); ?> <?php $front_p_sidebar = admin_options::get_values('front_page', 'layout'); ?> <div class="b c_1"> <?php getAdvertisement('zone_1'); ?> </div> <!--Categories and right side--> <div class="b c_2_l cat"> <div class="cat <?php if ($front_p_sidebar == 'left-sidebar') { echo 'fr'; } ?>
<?php $number_latest_posts = 4; /*get featured posts to be able to exclude them from latest posts*/ $numberposts = admin_options::get_values('featured_news', 'nr_posts'); $featured_categories_list = implode(',', admin_options::get_values('featured_news', 'category')); $args = array('numberposts' => $numberposts, 'category' => $featured_categories_list); $featured_posts = get_posts($args); $excluded_posts = '0'; foreach ($featured_posts as $post) { $excluded_posts = $excluded_posts . ',' . $post->ID; } $args = array('numberposts' => $number_latest_posts, 'exclude' => $excluded_posts); $latest_posts = get_posts($args); if (count($latest_posts) > 0) { ?> <!--Latest posts--> <div class="b c_1"> <div> <h3 class="h3title"><span><?php _e('Latest news', 'cosmotheme'); ?> </span></h3> </div> </div> <div class="b c_4 latest"> <?php foreach ($latest_posts as $post) { if (get_post_thumbnail_id($post->ID)) { $latest_post_img = wp_get_attachment_image(get_post_thumbnail_id($post->ID), 'latest', ''); } else {
function getAdvertisement($ad_name) { if (trim(admin_options::get_values('advertising', $ad_name)) != '') { echo '<div class="cosmo-ads">' . trim(admin_options::get_values('advertising', $ad_name)) . '</div>'; } }
$default['tabber']['status'] = 'yes'; $default['tabber']['popular_num'] = 5; $default['tabber']['latest_num'] = 5; $default['tabber']['comments_num'] = 5; $default['logo']['type'] = 'text_logo'; $default['front_page']['layout'] = 'right-sidebar'; $default['front_page']['categories'] = admin_options::get_categories(6, $exclude); $default['front_page']['nr_post'] = 6; $default['logo']['title'] = get_option('blogname'); $default['logo']['description'] = get_option('blogdescription'); $default['social_profiles']['twitter_id'] = 'cosmothemes'; $default['social_profiles']['fb_id'] = '158264557568118'; $default['advertising']['zone_1'] = ''; $default['post_settings']['social_sharing'] = 'yes'; $default['post_settings']['nbr_similar_posts'] = 4; foreach ($inputs as $group => $inp) { if ($group != '_') { admin_options::$register['settings'][] = $group; } } admin_options::$inputs = $inputs; admin_options::$default = $default; if (isset($_GET['page']) && $_GET['page'] == 'settings') { update_option('blogname', admin_options::get_values('logo', 'title')); update_option('blogdescription', admin_options::get_values('logo', 'description')); } else { $antet = get_option('logo'); $antet['title'] = get_option('blogname'); $antet['description'] = get_option('blogdescription'); update_option('logo', $antet); }
echo mysql2date(get_option('date_format'), $comment->comment_date); ?> </span> </li> <?php } } /*EOF else*/ ?> </ul> </div> <div> <?php if (admin_options::get_values('tabber', 'max_nr_tags') != '') { $args = array('number' => admin_options::get_values('tabber', 'max_nr_tags'), 'orderby' => 'count', 'order' => 'DESC'); $tags = get_tags($args); } else { $tags = get_tags(); } if (!sizeof($tags)) { _e('There are no tags', 'cosmotheme'); } else { foreach ($tags as $tag) { $tag_link = get_tag_link($tag->term_id); ?> <p class="tags"><a href="<?php echo $tag_link; ?>
$category_link = get_category_link($category->cat_ID); ?> <div class="cat_list full"> <h3 class="h3title"><a href="<?php echo $category_link; ?> "><span><?php echo $category->cat_name; ?> </span></a></h3> <div class="cat inline-block"> <ul class="switch half clearfix"> <?php //$numberposts = admin::get_field_val('category_posts_nbr_front'); $numberposts = admin_options::get_values('front_page', 'nr_post'); $post_number = 0; $args = array('cat' => $category->cat_ID, 'showposts' => 100, 'orderby' => 'date'); $cat_posts = new WP_Query($args); while ($cat_posts->have_posts()) { $cat_posts->the_post(); if (get_post_thumbnail_id($post->ID)) { $post_img = wp_get_attachment_image(get_post_thumbnail_id($post->ID), '62x62', ''); } else { $post_img = get_first_image($post->ID, '54x54'); } if (in_category($category->cat_ID, $post->ID) && $post_number < $numberposts) { ?> <li <?php if ($post_number % 2 == 1) { echo "class='col_2'";
/*EOF if*/ ?> <!--Similar posts--> <?php $categoriess = wp_get_post_categories($post->ID); /*here we get all categories for the current post*/ $excluded_categories = array_merge((array) admin_options::get_values('featured_news', 'category'), (array) admin_options::get_values('breaking_news', 'category')); /* now we need to remove "featured post" and "breaking news" categories */ foreach ($excluded_categories as $excluded_category) { if (is_numeric(array_search($excluded_category, $categoriess))) { unset($categoriess[array_search($excluded_category, $categoriess)]); } } $cats_list = implode(',', $categoriess); $args = array('cat' => $cats_list, 'post__not_in' => array($post->ID), 'orderby' => 'modified', 'posts_per_page' => admin_options::get_values('post_settings', 'nbr_similar_posts'), 'order' => 'DESC'); $query = new WP_Query($args); if ($query->found_posts > 0) { ?> <div class="cat inline-block"> <div class="cat_list full"> <h3 class="h3title"><span><?php _e('Similar posts', 'cosmotheme'); ?> </span></h3> <div> <?php $post_layout = get_post_meta($post->ID, 'layout', true); ?> <ul class="switch half clearfix <?php if ($post_layout == 'layout-full') {
.cosmo-textures .cosmo-textures-img:hover, .cosmo-textures .cosmo-textures-img { border: 3px solid #AAAAAA; } .cosmo-textures-img.selected{ border: 3px solid #AAAACC !important; } div.logo h1 a { float: left; font-family: '<?php echo admin_options::get_values('text_logo', 'font'); ?> ' , arial, serif !important; font-size:<?php echo admin_options::get_values('text_logo', 'font_size'); ?> px; display:block; text-decoration:none; color:#343434; } div.logo h1 a span{ float:left; width:100%; color:#9A9A9A; font-family:Arial; margin-top:15px; font-size:10px; }
</div> <!-- EOF b_page --> <div class="b_body_f"> <div class="b c_1"> <div> <?php echo menu('menu_in_footer', array('number-items' => admin_options::get_values('menu', 'footer'))); ?> </div> <div class="copyright"> <p class="fl">© 2013 <a href="<?php echo home_url(); ?> "><?php bloginfo('name'); ?> </a>. All Rights Reserved</p> <p class="fr">Powered By TFLSPBSMUN2013</p> </div> </div> </div> </div> <!-- b_body_c --> </div> </div> <!-- b_body --> <?php wp_footer(); echo admin_options::get_values('blog_settings', 'tracking_code'); ?> </body> </html>
"><?php echo $logo_text; ?> <span><?php echo $logo_text_description; ?> </span></a></h1> </div> <div class="fr"> <?php get_search_form(); ?> </div> </div> <!--Main menu--> <?php ?> <div class="b c_1 top_menu"> <div> <?php $exclude = array_merge((array) admin_options::get_values('featured_news', 'category'), (array) admin_options::get_values('breaking_news', 'category')); $menu = array('menu_id' => 'menu-top-menu', 'class' => 'sf-menu', 'type' => 'category', 'before-item' => '<span> </span>', 'exclude' => $exclude, 'number-items' => admin_options::get_values('menu', 'header')); echo menu('menu_in_header', $menu); ?> </div> </div> </div> <div class="b_page">