カスタム投稿ページを作成し、そこに投稿したものの一部のみのcssを適用したいのですが
統一のcssが使用されるので一部のみ解除の上手なやり方がわかりません。
UTF
1<div class="Inner ExhibitionStyle Type01"> 2<?php dynamic_sidebar(sidebar1); ?> 3<?php $tax_posts = get_posts('post_type=exhibition&taxonomy=year&term=collection01'); if($tax_posts): ?> 4<ul> 5<?php foreach($tax_posts as $tax_post): ?> 6<li><div class="cntSummary"><h4><?php echo esc_html($tax_post->post_title); ?><font size="2" color="red">移転しました</font></h4> 7<dl><dt><?php echo esc_html($tax_post->cf_sch01); ?>〜<?php echo esc_html($tax_post->cf_sch02); ?></dt> 8<dd><?php echo esc_html($tax_post->cf_place); ?><br><?php echo esc_html($tax_post->cf_tel); ?></dd></dl></div> 9<div class="cntRight"><a href="javascript:;" onclick="window.open('http://maps.google.co.jp/maps?q='+encodeURI('<?php echo esc_html($tax_post->cf_access); ?>'));return false;" href="javascript:;"><img src="<?php bloginfo('template_url'); ?>/img/exhibition/btn_map01_off.gif" alt="アクセスマップ" width="95" height="50"></a> 10<p class="p-Accessmap">» <a href="<?php echo esc_html($tax_post->cf_map); ?>" rel="lightbox">交通アクセス</a></p></div></li> 11<?php endforeach; ?> 12</ul> 13<?php endif; ?> 14</div> 15<?php get_footer();?>
こちらのcntSummaryの<font></font>部分を3番目と4番目のliのみ適用し、1番目と2番目はdisplay: none;などで表示自体を消したいのですがよくわからないという状況です。
何か良い方法はございませんでしょうか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/04/06 11:36
2017/04/06 11:38
2017/04/06 11:51
2017/04/06 11:55
2017/04/06 12:05
2017/04/06 12:09
2017/04/06 12:12
2017/04/06 12:15