<?php the_category() ?><?phpwp_list_categories('orderby=name&include=3,5,9,16'); ?><?php foreach((get_the_category()) as $cat) {if (!($cat->cat_ID=='37')) echo '<a href="' . get_bloginfo('url') . '/category/' . $cat->category_nicename . '/">'. $cat->cat_name . '</a>' . ', ';} ?>
<?php if (is_front_page() && !is_paged() )$posts = query_posts($query_string . '&cat=-35'); ?><?php$cat_to_exclude = 35;query_posts($query_string . '&cat=-'.$cat_to_exclude');?><?php if (in_category('35')) continue; ?>
function exclude_category_home( $query ) {if ( $query->is_home ) {$query->set( 'cat', '-5, -34' );}return $query;}add_filter( 'pre_get_posts', 'exclude_category_home' );
<?phpif (is_home()) {query_posts("cat=-3");}?>
<?phpif (is_home()) {query_posts("cat=-1,-2,-3");}?>
function excludeCat($query) {if ( $query->is_home ) {$query->set('cat', '-3,-5,-23');}return $query;}add_filter('pre_get_posts', 'excludeCat');
<?php query_posts("cat=-25,35"); ?>
<?php if (have_posts()) : ?>
<?php query_posts('cat=-49'); ?>
<?php if (is_home()) { query_posts($query_string . "&cat=-33");} ?><?php if(is_home()) {query_post("cat=-39");}?php>
<?php$excluded_cats = array( 44, 55 ); // ids to exclude$args = array( 'caller_get_posts' => 1, // Don't show stickies at top 'posts_per_page' => 5, // The number of latest to show 'category__not_in' => $excluded_cats,);query_posts($args);
if(is_category()):// only run this on category page $cc = get_queried_object(); $exclude = $cc->cat_name; //get the name of current category pageendif;
<?phpif(is_category()):// only run this on category page $cc = get_queried_object(); $exclude = $cc->cat_name; //get the name of current category pageendif;$categories = get_the_category();foreach($categories as $category) : if(is_category() && $category->name==$exclude) continue; //skip current category from being displayed only on category pages $category_link = get_category_link( $category->cat_ID ); echo '<li><a href="'.$category_link.'">'.$category->cat_name.'</a></li>';endforeach;?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- If the post is in the category we want to exclude, we simply pass to the next post. --> <?php if (in_category('3')) continue; ?> <div class="post"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y'); ?></small> <div class="entry"> <?php the_content(); ?> </div> <p class="postmetadata">Posted in <?php the_category(', '); ?></p> </div> <!-- closes the first div box --> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?>
โปรดรอ
cymiz.com insurance