Табы на css
.tab_wrap #tab9:checked~.tab_contents #tab_content9 { display:block;
Это вордпрессовская фича, отключается так
remove_action( 'template_redirect', 'redirect_canonical' );
почему не стояло? скачал архив CMS с офсайта. раньше всё ровно стояло, теперь шляпа какая то.
посмотрите через исходный код страницы пути к файлам стилей
Хотелось бы их устранить, а не просто скрыть от глаз
так попробовать
$sort_order = !empty($instance['asc_sort_order']) ? 'ASC' : 'DESC';
если int, то mysql и обработает запрос как число, т.е в запросе будет 2951871
echo (int)'2951871-2323'; //2951871
Создать для городов новый тип записей city
Добавить города, где post_name города == поддомену
Шорткод
function city_shortcode(){ $domain = explode('.', $_SERVER['HTTP_HOST']); if (!empty($domain[0]) && !empty($domain[1]) && !empty($domain[2])) { $page = get_page_by_path($domain[0], OBJECT, 'city'); return $page->post_title; } }add_shortcode('city', 'city_shortcode');
Дополнительно если нужно
function add_shortcode_to_filds( $text ){ return do_shortcode($text); } apply_filters( 'the_content', 'add_shortcode_to_filds' );//для работы шорткодов в заголовке страницыadd_filter( 'the_title', 'add_shortcode_to_filds' );//для работы шорткодов в заголовках и описании плагина wpseoadd_filter( 'wpseo_title', 'add_shortcode_to_filds' );add_filter('wpseo_metadesc','add_shortcode_to_filds');//для работы шорткодов в полях от плагина acfadd_filter('acf/format_value/type=textarea','add_shortcode_to_filds');add_filter('acf/format_value/type=text','add_shortcode_to_filds');
//изменение ссылок на субдоменfunction replace_sity_permalink($permalink, $post){ if ($post->post_type == 'sity') { $permalink = str_replace(array( '/sity/' . $post->post_name, '://' ), array( '', '://' . $post->post_name . '.' ), $permalink); } return $permalink;}add_filter('post_link', 'replace_sity_permalink', 20, 3);add_filter('post_type_link', 'replace_sity_permalink', 20, 3);
function wp_rel_nofollow2( $text ) { // This is a pre-save filter, so text is already escaped. $text = stripslashes( $text ); $text = preg_replace_callback( '|<a (.+?)>|i', function( $matches ) { return wp_rel_callback( $matches, 'sponsored nofollow' ); }, $text ); return wp_slash( $text );}function category_nofollow( $the_content ) { global $post; if( in_category( array(438) ) ) { $the_content = stripslashes( wp_rel_nofollow2( $the_content ) ); } return $the_content;} add_filter('the_content', 'category_nofollow');