?> <!-- End Articles Loop --> <?php wp_reset_postdata(); ?> <?php } elseif (is_category()) { ?> <?php $cur_cat_id = get_cat_id(single_cat_title("", false)); $category = get_cat_slug($cur_cat_id); $args = array('cat' => $category, 'posts_per_page' => 8); $archive = new WP_Query($args); if ($archive->have_posts()) { while ($archive->have_posts()) { $archive->the_post(); ?> <article id="post-<?php the_ID(); ?> " <?php post_class('cf'); ?> role="article"> <header class="article-header">
function list_sub_categories($current_post_id) { //$category = get_the_category($current_post_id); //$category_parent = $category[0]->category_parent; $category_parent = $current_post_id; $args = array('child_of' => $category_parent); $sub_categories = get_categories($args); foreach ($sub_categories as $sub_category) { $sub_args = array('showposts' => 5, 'category__in' => array($sub_category->term_id)); $posts = get_posts($sub_args); if ($posts) { ?> <li class="dir"><?php echo $sub_category->name; ?> <ul> <?php foreach ($posts as $post) { setup_postdata($post); ?> <li><a href="<?php echo get_permalink($post->ID); ?> " rel="bookmark"><?php echo $post->post_title; ?> </a></li> <?php } ?> <li><a href="http://gogorunning.com/category/<?php echo get_cat_slug($sub_category->cat_ID); ?> /">...more</a></li> </ul> </li> <?php } } }
function get_antennas_details() { //get all antenna users $users = get_antenna_users(); //count the number of user $nb = count($users); if ($nb === 1) { //if only 1 user, we assume that it's the admin user so $user->ID = 1 $categ_admin = get_cat_if_user(1); $antenna = get_cat_slug($categ_admin); $options = get_option('iftheme_theme_options_' . $antenna, iftheme_get_default_theme_options()); //cf. theme-options.php for keys of the option array //adding useful infos to $options $options['aid'] = $categ_admin; $options['slug'] = $antenna; } else { //more than 1 user foreach ($users as $k => $o) { $categ = get_cat_if_user($o->ID); //$categ = function_exists('icl_object_id') ? icl_object_id($categ, 'category', TRUE) : $categ; $antenna = get_cat_slug($categ) ? get_cat_slug($categ) : __('You must assign a category to this user : '******'iftheme') . $o->display_name; $options[$categ] = get_option('iftheme_theme_options_' . $antenna, iftheme_get_default_theme_options()); //cf. theme-options.php for keys of the option array //unset country options for non admin user //@todo: posibility to have multiple admin. Maybe check user's roles more then his ID if ($o->ID != 1) { unset($options[$categ]['bg_frame_country']); unset($options[$categ]['background_img_country']); unset($options[$categ]['theme_home_categ_country']); } //adding useful infos to $options $options[$categ]['aid'] = !$categ ? null : $categ; $options[$categ]['slug'] = $antenna; } } return $options; }
<p>' . $pulsar_first_page_description . '</p> --> <div class="content_6 content"> <div id="wrap25"> <div id="content4"> <div class="contentbox-wrapper-news-1"> <!--gal item--> '; ?> <?php global $post; $counter = 1; $firstCategoryID = get_cat_ID($pulsar_first_content_page_category); $firstCategory = get_cat_slug($firstCategoryID); $myposts = get_posts(array('category' => $firstCategoryID, 'posts_per_page' => 500)); foreach ($myposts as $post) { setup_postdata($post); ?> <div id="<?php $post_data = get_post($post->ID, ARRAY_A); $slug = $post_data['post_name']; echo $slug; ?> -1-3" class="contentbox"> <div class="article1"> <div class="view2 third-effect flexcroll"> <?php $VideoEmbed = get_post_meta($post->ID, 'VideoEmbed', true);
$cats = get_custom_field('grid_category_filter'); foreach ($cats as $cat) { $cat = urldecode($cat); $cat = get_cat_slug($cat); $cat_name = get_term_by('slug', $cat, 'category'); $catsluglink = '<a class="button" href="#" data-filter=".' . $cat . '">' . $cat_name->name . '</a> '; $acats[] = $catsluglink; } $cat_string = join(' ', $acats); $cat_string = urldecode($cat_string); echo $cat_string; } else { $cats = get_all_category_ids(); foreach ($cats as $cat) { $cat = urldecode($cat); $cat = get_cat_slug($cat); $cat_name = get_term_by('slug', $cat, 'category'); $catsluglink = '<a class="button" href="#" data-filter=".' . $cat . '">' . $cat_name->name . '</a> '; $acats[] = $catsluglink; } $cat_string = join(' ', $acats); $cat_string = urldecode($cat_string); echo $cat_string; } ?> </p> </div> </div> </div> <?php
?> </ul> </div> </div> <div class="midlsldercnt"> <div class="leftcatbox" style="height:auto;"> <div class="leftcatimgcntmn"> <?php echo get_cat_icon("echo=false&cat=13"); ///////////// Training //////////// ?> </div> <div class="leftcatnmcnt"> <h2 style="font-size:20px;text-decoration:underline"><a href="http://gogorunning.com/category/<?php echo get_cat_slug(13); ?> /"><?php echo get_cat_name(13); ?> </a></h2> </div> </div> <div class="rightcatslider"> <ul id="mycarousel3" class="jcarousel-skin-tango"> <?php query_posts('cat=13'); while (have_posts()) { the_post(); ?> <li>
<?php global $antenna, $multi, $options, $c, $antenna_op, $if_front; $cat_slug = is_front_page() || is_home() ? NULL : get_cat_slug($antenna); if ($multi) { $sidebar = !$cat_slug ? 'Sidebar' : 'Sidebar ' . $cat_slug; } else { $sidebar = 'Sidebar'; } ?> <div id="sidebar"> <?php //NEWSLETTER FORM $wysija_embedded = 1; //default to 1 = Form NL from IFtheme is displayed if ($multi) { // Get admin categ. Only admin can configure country homepage $categAdmin = get_cat_if_user(1); $wysija_embedded = isset($options[$categAdmin]['theme_options_setting_wysija_embed']) ? $options[$categAdmin]['theme_options_setting_wysija_embed'] : $wysija_embedded; } else { $wysija_embedded = isset($options['theme_options_setting_wysija_embed']) ? $options['theme_options_setting_wysija_embed'] : $wysija_embedded; } $wysija = defined('WYSIJA'); if ($wysija && $wysija_embedded) { $modelList = WYSIJA::get("list", "model"); $arrayOfMailingLists = $modelList->get(false, array('is_enabled' => 1)); $nbMailingLists = count($arrayOfMailingLists); foreach ($arrayOfMailingLists as $k => $list) { $lists[] = $list['list_id']; $names[$list['list_id']] = $list['name']; }