你好,在這個插件中,我為 cpt1 和 cpt2 寫了這 2 個代碼總帖子,現在我希望代碼獲得這 2 個 CPT 自定義帖子類型的總數 /// 這意味著 // menha_dir_ltg + mobadra1_dir_ltg = ??? 任何的想法//this is to count totala custom post -- mobadra2_dir_ltg - ta7tag da3madd_shortcode('total-listing-counter-menha','total_listing_counter?menha');function total_listing_counter?menha(){ $count_posts = wp_count_posts( 'menha_dir_ltg' )->publish; return $count_posts;}//this is to count totala custom post -- mobadra1_dir_ltg - ta7tag da3madd_shortcode('total-listing-counter-ta7tag-da3m','total_listing_counter?ta7tag?da3m');function total_listing_counter?ta7tag?da3m(){ $count_posts = wp_count_posts( 'mobadra1_dir_ltg' )->publish; return $count_posts;}
wordpress 中的總自定義帖子類型
慕無忌1623718
2022-12-23 16:13:59