■ このスレッドは過去ログ倉庫に格納されています
【WordPress部】プログラミングでよくわからん言葉(array)があるんだが誰か教えてくれい [743638351]
- 14 :番組の途中ですがアフィサイトへの\(^o^)/です :2022/01/31(月) 22:39:26.30 ID:iG5gfRxA0.net
- functioons.phpは
function custom_post_type_getarchives_where($where, $args){
$post_type = isset($args['post_type']) ? $args['post_type'] : 'post';
if (is_array($post_type)) {
$conds = array();
foreach ($post_type as $type) {
$conds[] = "post_type = '".esc_sql($type)."'";
}
$cond = '('.implode(' OR ', $conds).')';
} else {
$cond = "post_type = '".esc_sql($post_type)."'";
}
return "WHERE $cond AND post_status = 'publish'";
}
add_filter('getarchives_where', 'custom_post_type_getarchives_where', 10, 2);
総レス数 27
7 KB
新着レスの表示
掲示板に戻る
全部
前100
次100
最新50
read.cgi ver.24052200