人力検索はてな
モバイル版を表示しています。PC版はこちら
i-mobile

wordpress popular postsのulのクラスを変えたいのですがstr_replaceの挿入箇所を教えてください。
下記のPHPのどこに
$popular = ob_get_clean();
$popular = str_replace('<ul class="wpp-list">', '<ul class="samecate">', $popular);
を入れたらulのclassを変えられますか?
ネットで調べてみましたが、もともとの書き方が違う例しか見つけられず、どこに記載していいか分かりません。分かる方、宜しくお願いします。

<?php if (function_exists('wpp_get_mostpopular')): ?>
<h3>よく読まれている<?php $cat = get_the_category(); $cat = $cat[0]; $catp = $cat->category_parent ; $catn = get_the_category_by_ID( $catp ); $catl = get_category_link( $catp ); ?><?php echo $catn; ?>情報</h3>
<?php
// オプションの設定
$args = array(
'limit' => 6,
'range' => 'weekly',
'order_by' => 'views',
'post_type' => 'post',
'thumbnail_width' => 80,
'thumbnail_height' => 80,
'title_length' => 40,
'post_html' => "<li>{thumb}{title}</li>"
);

global $_curcat;
if ($_curcat->term_id) {
if ($_curcat->category_parent != 0) {
$_curcat = get_top_category($_curcat->term_id);
}
$catids = get_categories('fields=ids&child_of=' . $_curcat->term_id);
$catids[] = $_curcat->term_id;
$args['cat'] = implode(',', $catids);
}
// 関数の実行
wpp_get_mostpopular($args);
?>

●質問者: ringomaru
●カテゴリ:ウェブ制作
○ 状態 :キャンセル
└ 回答数 : 0/0件

回答がありません
関連質問

●質問をもっと探す●



0.人力検索はてなトップ
8.このページを友達に紹介
9.このページの先頭へ
対応機種一覧
お問い合わせ
ヘルプ/お知らせ
ログイン
無料ユーザー登録
はてなトップ