テンプレートを使用してサイトを作っています。
以下、functions.phpでウィジェットを作成している箇所です。
PHP
1if ( !empty( $mts_options['mts_top_footer'] )) { 2 register_sidebars( '3', array( 3 'name' => __( 'Home Footer %d', 'mythemeshop' ), 4 'description' => __( 'Appears at the top of the footer on Homepage.', 'mythemeshop' ), 5 'id' => 'footer-top', 6 'before_widget' => '<div id="%1$s" class="widget %2$s">', 7 'after_widget' => '</div>', 8 'before_title' => '<h3 class="widget-title">', 9 'after_title' => '</h3>', 10 ) ); 11 }
今回、ループではなくウィジェットを利用して投稿を出力しています。その出力される内容を、記事にタグがある場合は以下のように出力するようにしたいです。
<ul> <li class="タグ名"></li> <li class="タグ名"></li> <li class="タグ名"></li> </ul>ご教授下さい。
よろしくお願い致します。
あなたの回答
tips
プレビュー