Студент | Это всё, что содержит файл single.php для моей темы. Тема storefront.
PHP код: <?php /** * The template for displaying all single posts. * * @package storefront */
get_header(); ?>
<div id="primary" class="content-area"> <main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php do_action( 'storefront_single_post_before' );
get_template_part( 'content', 'single' );
/** * @hooked storefront_post_nav - 10 * @hooked storefront_display_comments - 20 */ do_action( 'storefront_single_post_after' ); ?>
<?php endwhile; // end of the loop. ?>
</main><!-- #main --> </div><!-- #primary -->
<?php do_action( 'storefront_sidebar' ); ?> <?php get_footer(); ?>
Вот это ещё нашёл в css файле темы, думаю имеет отношение
Код: /**
* Post Formats
*/
.blog .format-aside .entry-title, .archive .format-aside .entry-title {
display: none; }
/**
* Media
*/
.page-content img.wp-smiley,
.entry-content img.wp-smiley,
.comment-content img.wp-smiley {
border: none;
margin-bottom: 0;
margin-top: 0;
padding: 0;
display: inline-block; } И ещё плюс это код из структуры ../public_html/wp-content/themes/storefront/inc/structure
Код: <?php
/**
* Template functions used for posts.
*
* @package storefront
*/
if ( ! function_exists( 'storefront_post_header' ) ) {
/**
* Display the post header with a link to the single post
* @since 1.0.0
*/
function storefront_post_header() { ?>
<header class="entry-header">
<?php
if ( is_single() ) {
storefront_posted_on();
the_title( '<h1 class="entry-title" itemprop="name headline">', '</h1>' );
} else {
if ( 'post' == get_post_type() ) {
storefront_posted_on();
}
the_title( sprintf( '<h1 class="entry-title" itemprop="name headline"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' );
}
?>
</header><!-- .entry-header -->
<?php
}
}
if ( ! function_exists( 'storefront_post_content' ) ) {
/**
* Display the post content with a link to the single post
* @since 1.0.0
*/
function storefront_post_content() {
?>
<div class="entry-content" itemprop="articleBody">
<?php
storefront_post_thumbnail( 'full' );
the_content(
sprintf(
__( 'Continue reading %s', 'storefront' ),
'<span class="screen-reader-text">' . get_the_title() . '</span>'
)
);
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'storefront' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<?php
}
}
if ( ! function_exists( 'storefront_post_meta' ) ) {
/**
* Display the post meta
* @since 1.0.0
*/
function storefront_post_meta() {
?>
<aside class="entry-meta">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'storefront' ) );
if ( $categories_list && storefront_categorized_blog() ) : ?>
<span class="cat-links">
<?php
echo '<span class="screen-reader-text">' . esc_attr( __( 'Categories: ', 'storefront' ) ) . '</span>';
echo wp_kses_post( $categories_list );
?>
</span>
<?php endif; // End if categories ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'storefront' ) );
if ( $tags_list ) : ?>
<span class="tags-links">
<?php
echo '<span class="screen-reader-text">' . esc_attr( __( 'Tags: ', 'storefront' ) ) . '</span>';
echo wp_kses_post( $tags_list );
?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if 'post' == get_post_type() ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'storefront' ), __( '1 Comment', 'storefront' ), __( '% Comments', 'storefront' ) ); ?></span>
<?php endif; ?>
</aside>
<?php
}
}
if ( ! function_exists( 'storefront_paging_nav' ) ) {
/**
* Display navigation to next/previous set of posts when applicable.
*/
function storefront_paging_nav() {
global $wp_query;
$args = array(
'type' => 'list',
'next_text' => _x( 'Next', 'Next post', 'storefront' ) . ' <span class="meta-nav">→</span>',
'prev_text' => '<span class="meta-nav">←</span> ' . _x( 'Previous', 'Previous post', 'storefront' ),
);
the_posts_pagination( $args );
}
}
if ( ! function_exists( 'storefront_post_nav' ) ) {
/**
* Display navigation to next/previous post when applicable.
*/
function storefront_post_nav() {
$args = array(
'next_text' => '%title <span class="meta-nav">→</span>',
'prev_text' => '<span class="meta-nav">←</span> %title',
);
the_post_navigation( $args );
}
}
if ( ! function_exists( 'storefront_posted_on' ) ) {
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function storefront_posted_on() {
$time_string = '<time class="entry-date published updated" datetime="%1$s" itemprop="datePublished">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s" itemprop="datePublished">%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
$posted_on = sprintf(
_x( 'Posted on %s', 'post date', 'storefront' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);
$byline = sprintf(
_x( 'by %s', 'post author', 'storefront' ),
'<span class="vcard author"><span class="fn" itemprop="author"><a class="url fn n" rel="author" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span></span>'
);
echo apply_filters( 'storefront_single_post_posted_on_html', '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>', $posted_on, $byline );
}
} Думаю, что копать надо под последний, ибо в сингле темы нет них... чего. Последний раз редактировалось Flip_Syde; 20.01.2016 в 06:13. |