parent==SUCCESS_CAT_ID; $IS_MEETUP_LIST = $cur_cat_id==MEETUP_CAT_ID || $cur_cat->parent==MEETUP_CAT_ID; $IS_FOUNDATION_LIST = $cur_cat_id==FOUNDATION_CAT_ID; $IS_SUCCASE_ALIKE_LAYOUT = $IS_SUCCESS_LIST||$IS_MEETUP_LIST; $paged = get_query_var( 'paged' ); if($paged$offset, 'cat'=>$cur_cat_id, 'posts_per_page'=>$PAGE_SIZE, ); if($IS_MEETUP_LIST){ $args['orderby'] = 'meta_value'; $args['meta_key'] = 'signup_deadline_date'; $args['order'] = 'DESC'; } if($cur_tag){ $args['tag__in'] = array($cur_tag); } $query = new WP_Query( $args ); $IS_NEED_SHOW_PAGER = !$IS_FOUNDATION_LIST; if($IS_SUCCASE_ALIKE_LAYOUT){ ?>
" id="successcase-grey1">
cat_name . v2_editlink('CATE'.$cur_cat->cat_ID));?> description){ echo '
' . v2_editlink('CATE'.$cur_cat->cat_ID) . $cur_cat->description . '
'; } ?>
> have_posts() ) { $idx = 0; $is_outputed_end_tag = null; while ( $query->have_posts() ) { $query->the_post(); $p = $post; $idx_mod_value = $idx%$PC_COLUM_NUM; if($idx_mod_value%$PC_COLUM_NUM==0){ $is_outputed_end_tag = false; echo '
'; } ?>
ID); if($ary_tags__){ foreach($ary_tags__ as$tag){ $ary_tags[] = array('href'=>CATEGORY_PREFIX_URL.$cur_cat->slug.'/?tag_id='.$tag->term_id, 'txt'=>$tag->name); } } # $imgsrc = get_featured_imgsrc($p->ID, 'full'); # $ft_html = ''; $post_href_after_meetup = ''; if($IS_MEETUP_LIST){ $meetup_signup_link = get_post_meta($p->ID, 'meetup_signup_link', true); if($meetup_signup_link){ $meetup_deadline_date = get_post_meta($p->ID,'signup_deadline_date',true); $is_meetup_signup_ended = $meetup_deadline_date && $now>$meetup_deadline_date; $ft_html .= $is_meetup_signup_ended ? display_btn2c($meetup_signup_link, '活動詳情', '', array('is_target_blank'=>true)) : display_btn2d($meetup_signup_link, '報名', '', array('is_target_blank'=>true)) ; } $post_href_after_meetup = ''; $postid_after_meetup = get_post_meta($p->ID, 'postid_after_meetup', true); if(1===preg_match('/[0-9]+/',$postid_after_meetup)){ # maybe (string)"null" $post_href_after_meetup = get_the_permalink($postid_after_meetup); }else{ // After 2019.10.23 $post_href_after_meetup = get_post_meta($p->ID,'link_after_meetup',true); } if($post_href_after_meetup){ $is_internal_link = strpos($post_href_after_meetup, '//aiacademy.tw/')!==false || strpos($post_href_after_meetup, '/')===0; $ft_html .= display_btn2c($post_href_after_meetup,'會後報導','',array('is_target_blank'=>$is_internal_link)); } } # if($IS_SUCCESS_LIST){ $box_href = 'javascript:;'; }elseif($p->ID==FOUNDATION_RULES_PAGE_ID){ $box_href = explode('"', explode('href="', $p->post_content)[1])[0]; }elseif($IS_MEETUP_LIST){ $box_href = $post_href_after_meetup ? $post_href_after_meetup : $meetup_signup_link; #get_post_meta($p->ID, 'meetup_signup_link',true); }else{ $box_href = get_the_permalink($p->ID); } # if($IS_MEETUP_LIST){ $place = ''; foreach(get_the_category($p->ID) as$sub_cat){ if($sub_cat->cat_ID==TP_MEETUP_CAT_ID ||$sub_cat->cat_ID==HC_MEETUP_CAT_ID ||$sub_cat->cat_ID==TC_MEETUP_CAT_ID ||$sub_cat->cat_ID==ST_MEETUP_CAT_ID ){ $place=mb_substr($sub_cat->cat_name,0,2);break; } } $hd = str_replace('-','/',$meetup_deadline_date) . ' ' . $place; $bd = isset($_GET['debug_meetup_clamp']) ? $p->post_title.$p->post_title.$p->post_title : $p->post_title; $hd_htmltag = 'div'; $bd_htmltag = 'h2'; }else{ $hd = $p->post_title; $bd = $p->post_excerpt; $hd_htmltag = 'h2'; $bd_htmltag = 'div'; } # echo v2_display_pureboxA( $hd , v2_editlink($p->ID) , $bd , $box_href , $imgsrc , $IS_FOUNDATION_LIST ? DEFAULT_PUREBOXA_STYLE_NO_BUT_CENTER_IMG : DEFAULT_PUREBOXA_STYLE_NO , '' , array('hd_htmltag'=>$hd_htmltag, 'bd_htmltag'=>$bd_htmltag, 'ary_tags'=>$ary_tags, # so far, for success cases posts only 'ft_html'=>$ft_html, # so far, for meetup posts only ) ); ?>
'; } $idx++; } // while if($is_outputed_end_tag===false){ foreach(range(1,$PC_COLUM_NUM - $idx_mod_value - 1)as$_){ echo '
'; } echo'
'; } } // if #endforeach; ?> slug.'/' , $href_suffix) , $paged , $query->found_posts , $PAGE_SIZE); }else{ echo space_func(FOOTER_TOP_SPACE); } ?>