init
This commit is contained in:
31
template-parts/content.php
Normal file
31
template-parts/content.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<article id="post-<?php the_ID(); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
</header>
|
||||
|
||||
<?php if (is_search() || is_archive()) : ?>
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
// Чтобы работали таилвинд селекторы с &
|
||||
remove_filter('the_content', 'wptexturize');
|
||||
remove_filter('the_content', 'wp_filter_content_tags');
|
||||
|
||||
the_content();
|
||||
|
||||
// Включаем обратно для других постов
|
||||
add_filter('the_content', 'wptexturize');
|
||||
add_filter('the_content', 'wp_filter_content_tags');
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</article>
|
||||
Reference in New Issue
Block a user