public function add_cpt_to_home_and_rss( $query ) {
/**
* get_post_types
* get_post_type
*/
// MAIN
if ( is_home() && $query->is_main_query() || is_feed() ) {
$query->set( 'post_type', array( 'post', 'article' ) );
}
// ARCHIVE
elseif ( $query->is_archive() && $query->is_main_query() && !is_admin() ) {
$query->set( 'post_type', array( 'post', 'article' ) );
}
// SEARCH
elseif ( $query->is_search() && $query->is_main_query() && !is_admin() ) {
$query->set( 'post_type', array( 'post', 'article' ) );
}
return $query;
}
$this->loader->add_action( 'pre_get_posts', $plugin_post_types, 'add_cpt_to_home_and_rss', 999 );
window.onload = function () {
jQuery("#user-city").text(ymaps.geolocation.city);
jQuery("#user-region").text(ymaps.geolocation.region);
jQuery("#user-country").text(ymaps.geolocation.country);
}