-
-
Save eksana/8d8bb6f04c6705ab465738a5a82d2601 to your computer and use it in GitHub Desktop.
Прикручиваем лендинг к странице записей
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Необходимо открыть файл функций шаблона functions.php и сразу после <?php с новой строки вставим такое: | |
/* шаблон одиночной записи */ | |
function mojwp_single($mojwp_template) { | |
global $wp_query, $post; | |
if(file_exists(TEMPLATEPATH . '/single-' . $post->ID . '.php')) { | |
return TEMPLATEPATH . '/single-' . $post->ID . '.php'; | |
} | |
if(file_exists(TEMPLATEPATH . '/single.php')) { | |
return TEMPLATEPATH . '/single.php'; | |
} | |
return $mojwp_template; | |
} | |
add_filter('single_template', 'mojwp_single'); | |
http://mojwp.ru/kak-prikrutit-landing-page.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://mojwp.ru/kak-prikrutit-landing-page.html
https://toster.ru/q/202293
http://exabyte.ws/wordpress/sozdaem-svoi-dopolnitelnye-polya-metaboxes-v-wordpress.html/