-
-
Save tenman/3fa13c9ea839d56aae83da1b8328ad10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
//featcat1 | |
if($featcat1 && $featcat1 != 'Choose a category'): | |
$custom_query1 = apply_filters('meso_featcat_query_one', 'cat='. $featcat1 . '&' . 'offset=' . '&' . 'showposts=' . $featcat1_count); | |
$my_query1 = new WP_Query($custom_query1); ?> | |
<aside class="home-feat-cat post_tn_cat_color_<?php echo dez_get_strip_variable($featcat1); ?>"> | |
<h4 class="homefeattitle feat_tn_cat_color_<?php echo dez_get_strip_variable($featcat1); ?>"><a href="<?php echo apply_filters('meso_featcat_link_one',get_category_link( $featcat1 )); ?>"><?php printf( __( '%1$s', 'mesocolumn' ), apply_filters('meso_featcat_name_one',stripcslashes($featcat1_name) ) ); ?></a> <a title="<?php _e('Get Feed for', 'mesocolumn'); ?> <?php echo $featcat1_name; ?>" href="<?php echo rtrim( get_category_link( $featcat1 ), '/'); ?>/feed/"><img class="home-feat-rss" src="<?php echo get_template_directory_uri(); ?>/images/rss2.png" alt="<?php _e('Get Feed for', 'mesocolumn'); ?> <?php printf( __( '%1$s', 'mesocolumn' ), apply_filters('meso_featcat_name_one',stripcslashes($featcat1_name) ) ); ?>" /></a></h4> | |
<div class="homefeat"> | |
<?php $hfc1 = 0; while ($my_query1->have_posts()) : $my_query1->the_post(); $do_not_duplicate = $post->ID; ?> | |
<?php if( $hfc1 < 1 ) { ?> | |
<article class="hentry hnews <?php if( $cat1_count <= 1 ): ?>feat-is-single <?php endif; ?>feat-post fpost feat-<?php echo $post->ID; ?> fp<?php echo $hfc1; ?>"> | |
<?php get_template_part('lib/templates/feat-cat-meta', 'top'); ?> | |
</article> | |
<?php } else { ?> | |
<?php /*ここから*/ | |
if( $hfc1 == 1 ) { ?> | |
<article style="background:#eee;">広告1</article> | |
<?php } /*ここまで*/ ?> | |
<article <?php post_class('feat-post apost'. ' fp'.$hfc1); ?>> | |
<?php get_template_part('lib/templates/feat-cat-meta', 'bottom'); ?> | |
</article> | |
<?php } ?> | |
<?php $hfc1++; endwhile; wp_reset_postdata(); ?> | |
</div> | |
</aside> | |
<?php endif; | |
//featcat2 | |
if($featcat2 && $featcat2 != 'Choose a category'): | |
$custom_query2 = apply_filters('meso_featcat_query_two', 'cat='. $featcat2 . '&' . 'offset=' . '&' . 'showposts=' . $featcat2_count); | |
$my_query2 = new WP_Query($custom_query2); ?> | |
<aside class="home-feat-cat post_tn_cat_color_<?php echo dez_get_strip_variable($featcat2); ?>"> | |
<h4 class="homefeattitle feat_tn_cat_color_<?php echo dez_get_strip_variable($featcat2); ?>"><a href="<?php echo apply_filters('meso_featcat_link_two',get_category_link( $featcat2 )); ?>"><?php printf( __( '%1$s', 'mesocolumn' ), apply_filters('meso_featcat_name_two',stripcslashes($featcat2_name) ) ); ?></a> <a title="<?php _e('Get Feed for', 'mesocolumn'); ?> <?php echo $featcat2_name; ?>" href="<?php echo rtrim( get_category_link( $featcat2 ), '/'); ?>/feed/"><img class="home-feat-rss" src="<?php echo get_template_directory_uri(); ?>/images/rss2.png" alt="<?php _e('Get Feed for', 'mesocolumn'); ?> <?php printf( __( '%1$s', 'mesocolumn' ), apply_filters('meso_featcat_name_two',stripcslashes($featcat2_name) ) ); ?>" /></a></h4> | |
<div class="homefeat"> | |
<?php $hfc2 = 0; while ($my_query2->have_posts()) : $my_query2->the_post(); $do_not_duplicate = $post->ID; ?> | |
<?php if( $hfc2 < 1 ) { ?> | |
<article class="hentry hnews <?php if( $cat2_count <= 1 ): ?>feat-is-single <?php endif; ?>feat-post fpost feat-<?php echo $post->ID; ?> fp<?php echo $hfc2; ?>"> | |
<?php get_template_part('lib/templates/feat-cat-meta', 'top'); ?> | |
</article> | |
<?php } else { ?> | |
<?php /*ここから*/ | |
if( $hfc2 == 1 ) { ?> | |
<article style="background:#eee;">広告2</article> | |
<?php } /*ここまで*/ ?> | |
<article <?php post_class('feat-post apost'. ' fp'.$hfc2); ?>> | |
<?php get_template_part('lib/templates/feat-cat-meta', 'bottom'); ?> | |
</article> | |
<?php } ?> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment