function imnobby_home_page_post_filter($query){ if($query->is_home() && $query->is_main_query()) { $query->set('cat', '-72'); // get_the_ID('codedb'); } } add_action('pre_get_posts', 'imnobby_home_page_post_filter');Related Keywords: Developer, How-to, Solved, WP Action Filter Hook, Override Default WP Loop, Override Main Query
喜歡這篇文章嗎?
(暫時未有評分)
Loading...
(暫時未有評分)
Loading...