I am making an attempt to get my Customized Submit Kind to indicate up in the primary archive utilizing pre_get_posts, nevertheless it simply will not work.
Nevertheless, within the search outcomes the entries are displayed, and they’re additionally displayed inside an assigned class.
The code I take advantage of:
perform include_custom_post_type_archives($question) {
if ((is_category() || is_tag()) && $query->is_archive() && empty($query->query_vars['suppress_filters'])) {
$query->set('post_type', array('publish', 'landingpages'));
}
return $question;
}
add_filter('pre_get_posts', 'include_custom_post_type_archives');