예제 #1
0
?>
;
}


/*
// Box shadow.
*/

<?php 
$locations = get_nav_menu_locations();
$items = wp_get_nav_menu_items($locations['primary']);
foreach ($items as $item) {
    if ($item->type == 'taxonomy' && $item->menu_item_parent == 0) {
        $t_id = $item->object_id;
        $accent = x_ethos_category_accent_color($t_id, $x_site_link_color);
        ?>

    <?php 
        if ($x_navbar_positioning == 'static-top' || $x_navbar_positioning == 'fixed-top') {
            ?>

      .x-navbar .desktop .x-nav > li.tax-item-<?php 
            echo $t_id;
            ?>
 > a:hover,
      .x-navbar .desktop .x-nav > li.tax-item-<?php 
            echo $t_id;
            ?>
.x-active > a {
        box-shadow: 0 <?php 
예제 #2
0
    $i++;
    ?>
      <?php 
}
?>
    </ul>
  </li>
</ul>

<div class="x-filterable-index">

  <?php 
foreach ($categories as $category) {
    static $j = 1;
    $selected = $j == 1 ? ' selected' : '';
    $accent = x_ethos_category_accent_color($category->term_id, '#333333');
    $wp_query = new WP_Query(array('post_type' => 'post', 'paged' => $paged, 'cat' => $category->term_id));
    echo '<div class="x-filterable-category-group' . $selected . '" data-category-id="' . $category->term_id . '">';
    if ($wp_query->have_posts()) {
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            x_get_view('ethos', 'content', get_post_format());
        }
    }
    echo '<a href="' . get_category_link($category->term_id) . '" class="x-btn-filterable x-btn">See All ' . $category->name . ' Posts</a>';
    echo '</div>';
    wp_reset_query();
    $j++;
}
?>