Svetozar
Ответы в темах
Просмотр 5 ответов — с 1 по 5 (всего 5)
-
Thanks! I know that I need to add some logic:
if (is_category() || is_archive() && !is_admin()) { $query->set('post_type',array('project', 'expert')); } }… because if I don’t add «if» — I have trouble in admin-side. But I don’t understand: why I need to add «$query->set(‘post_type’,array(‘project’, ‘expert’));»?
Problem sovled by adding in function.php this code:
function query_post_type($query){ $query->set('post_type',array('custpostype_1', 'custpostype_2')); } add_filter('pre_get_posts','query_post_type');Scott, thanks! But the article is about custom Category..
Just I want to understand how use embedding Category 🙂
Не сразу на Pods натолкнулся.. Поэтому было предположение что может что-то более удобное я пропустил:)
Спасибо за ссылку!
Видимо надо писать код.. Эх)Не сразу на Pods натолкнулся.. Поэтому было предположение что может что-то более удобное я пропустил:)
Просмотр 5 ответов — с 1 по 5 (всего 5)