<?php
/**
* Single Post Page
*
* @package WordPress
* @subpackage Fenomen
* @since Fenomen 1.0
*/
$fenomen_sidebar_align = get_post_meta( get_the_ID(), 'fenomen-sidebar-align', true );
$fenomen_pformat_box = get_post_meta( get_the_ID(), 'fenomen-pformat-box', true );
if ( !$fenomen_sidebar_align ) {
$fenomen_sidebar_align = 'default';
}
if ( !$fenomen_pformat_box ) {
$$fenomen_pformat_box = 'default';
}
if ( is_active_sidebar( 'fenomen-single-post-sidebar' ) ) {
$sidebar = 'fenomen-single-post-sidebar';
} else {
$sidebar = 'fenomen-default-sidebar';
}
$single_post_array = fenomen_get_field('single_post_elements', 'Enabled');
fenomen_set_views(get_the_ID());
get_header();
?>
<div class="container<?php if ( fenomen_get_field('sidebar_single_post_align') == "left" and ( $fenomen_sidebar_align == "default" ) ) { ?> sidebar-left<?php } elseif ( fenomen_get_field('sidebar_single_post_align') == "right" and ( $fenomen_sidebar_align == "default" ) ) { ?> sidebar-right<?php } else { if ( $fenomen_sidebar_align == "left" ) { ?> sidebar-left<?php } elseif ( $fenomen_sidebar_align == "right" ) { ?> sidebar-right<?php } elseif ( $fenomen_sidebar_align == "full" or ( $fenomen_sidebar_align == "default" and fenomen_get_field('sidebar_single_post_align') == "full" ) ) { ?> no-sidebar-wide<?php } else { ?> sidebar-right<?php } } ?> clearfix">
<?php echo fenomen_get_first_large_row($post->ID); ?>
<div class="container-wrapper clearfix">
<?php if ( ( fenomen_get_field('single_post_pformat_box_style') == "wide" and $fenomen_pformat_box == "default" ) or $fenomen_pformat_box == "wide" ) { ?>
<div class="single-post-featured-image clearfix"><?php echo fenomen_single_post_format_boxes('wide'); ?></div>
<?php } ?>
<div class="container-inner">
<div id="content">
<div class="content-wrapper clearfix">
<?php if ( have_posts() ) { while ( have_posts() ) { the_post(); ?>
<?php
if ( ( fenomen_get_field('single_post_pformat_box_style') == "wide" and $fenomen_pformat_box == "default" ) or $fenomen_pformat_box == "wide" ) {
if ( fenomen_get_field('single_post_share_icons_active') ) {
if ( fenomen_get_field('single_post_share_icons_place') == "content" ) {
$content_box = fenomen_single_post_content('false', '', 'content');
} else {
$content_box = fenomen_single_post_content('false', '', 'side');
}
} else {
if ( fenomen_get_field('single_post_share_icons_place') == "content" ) {
$content_box = fenomen_single_post_content('false', 'false', 'content');
} else {
$content_box = fenomen_single_post_content('false', 'false', 'side');
}
}
} else {
if ( fenomen_get_field('single_post_share_icons_active') ) {
if ( fenomen_get_field('single_post_share_icons_place') == "content" ) {
$content_box = fenomen_single_post_content('', '', 'content');
} else {
$content_box = fenomen_single_post_content('', '', 'side');
}
} else {
if ( fenomen_get_field('single_post_share_icons_place') == "content" ) {
$content_box = fenomen_single_post_content('', 'false', 'content');
} else {
$content_box = fenomen_single_post_content('', 'false', 'side');
}
}
}
?>
<div class="single-post-inner">
<?php
if ( $single_post_array && array_key_exists( 'content', $single_post_array ) ) {
foreach ( $single_post_array as $key => $element ) {
switch($key) {
case 'content': echo $content_box; break;
case 'navigation': echo fenomen_single_post_nav(); break;
case 'related_posts': echo fenomen_single_post_related_posts(); break;
case 'author': echo fenomen_single_post_author(); break;
case 'advert': echo fenomen_single_post_advert(); break;
}
}
} else {
echo $content_box;
echo fenomen_single_post_nav();
echo fenomen_single_post_related_posts();
echo fenomen_single_post_author();
echo fenomen_single_post_advert();
}
comments_template();
?>
</div>
<?php } } ?>
</div>
</div>
<!-- content -->
<?php if ( $fenomen_sidebar_align == "full" or ( $fenomen_sidebar_align == "default" and fenomen_get_field('sidebar_single_post_align') == "full" ) ) {} else { ?>
<aside id="sidebar" class="sidebar">
<div class="fm-box-layout sidebar-wrapper clearfix">
<div class="sidebar-container">
<?php
if ( is_singular() ) {
$id = get_queried_object_id();
$custom = get_post_meta( $id, 'fenomen-custom-sidebar', true );
if ( ! empty($custom) ) $sidebar = $custom;
}
if ( is_active_sidebar( $sidebar ) ) {
dynamic_sidebar( $sidebar );
}
?>
</div>
</div>
</aside>
<!-- sidebar -->
<?php } ?>
</div>
</div>
</div>
<!-- container -->
<?php get_footer(); ?>
<div class="single-post-inner">
<?php
if ( $single_post_array && array_key_exists( 'content', $single_post_array ) ) {
foreach ( $single_post_array as $key => $element ) {
switch($key) {
case 'content': echo $content_box; break;
case 'navigation': echo fenomen_single_post_nav(); break;
case 'related_posts': echo fenomen_single_post_related_posts(); break;
case 'author': echo fenomen_single_post_author(); break;
case 'advert': echo fenomen_single_post_advert(); break;
}
}
} else {
echo $content_box;
echo fenomen_single_post_nav();
echo fenomen_single_post_related_posts();
echo fenomen_single_post_author();
echo fenomen_single_post_advert();
}
comments_template();
?>
</div>
case 'content': echo $content_box; break;
Переменной $content_box значение присваивается выше и во всех случаях через функцию fenomen_single_post_content()
. Ищите объявление этой функции и смотрите , что она делает. Как минимум, инклудит php файл с разметкой контента поста, вот он вам и нужен. И не забывайте все делать через дочернюю тему, судя по всему ваша тема, как минимум, скачанна из репозитория, как максимум, платная.