@Skrighal

Как вставить сторонний код в файл single.php темы Twenty Fifteen?

Использую тему Twenty Fifteen. Необходимо в конце записи вставить сторонний код. Однако файл этой темы не совсем стандартный. В других темах в файле Single.php все открывается и закрывается скобками "< >", мне так привычнее и можно спокойно вставлять сторонний код вроде кнопок поделиться, рейтинга и т.д.

А куда и как тут вставить код с "< >", если файл single.php темы Twenty Fifteen выглядит следующим образом:

<?php
// Start the loop.
while ( have_posts() ) :
the_post();

/*
* Include the post format-specific template for the content. If you want
* to use this in a child theme, then include a file called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;

// Previous/next post navigation.
the_post_navigation(
array(
'next_text' => '' . __( 'Next', 'twentyfifteen' ) . ' ' .
'' . __( 'Next post:', 'twentyfifteen' ) . ' ' .
'%title',
'prev_text' => '' . __( 'Previous', 'twentyfifteen' ) . ' ' .
'' . __( 'Previous post:', 'twentyfifteen' ) . ' ' .
'%title',
)
);

// End the loop.
endwhile;
?>
  • Вопрос задан
  • 37 просмотров
Пригласить эксперта
Ответы на вопрос 1
OtshelnikFm
@OtshelnikFm Куратор тега WordPress
Обо мне расскажет yawncato.com
<?php - открывающий тег
?> закрывающий. php код вставляй между ними. html или текст или там же через echo или после закрывающего php https://www.php.net/manual/en/language.basic-synta...
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы