[php]
<?php if(is_page(16)){ ?>
<img src="<?php echo get_template_directory_uri(); ?>/images/mainImg_<?php the_ID() ;?>.jpg" />
<?php } ?>
[/php]
WordPressのウィジェットに個別のid,classを設定して、違うデザインを適用したい場合は、functions.php内でサイドウィジェットを有効にする設定項目の「before_widget」の箇所を以下のように変更します。
register_sidebar(array( 'name' => 'side-widget', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>', ));サイドウィジェットを利用する
この投稿へのコメント
コメントはまだありません。