<!-- content-page.php -->
<?php
/**
* Template part for displaying page content in page.php
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package blogtimes
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<?php blogtimes_post_thumbnail(); ?>
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'blogtimes' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Edit <span class="screen-reader-text">%s</span>', 'blogtimes' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'<span class="edit-link">',
'</span>'
);
?>
</footer><!-- .entry-footer -->
<?php endif; ?>
</article><!-- #post-<?php the_ID(); ?> -->
<!-- header.php -->
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<link rel="stylesheet" href="<?php bloginfo('template_directory') ?>\css\style.css">
<link rel="stylesheet" href="<?php bloginfo('template_directory') ?>\css\mediaStyle.css">
<meta charset="UTF-8">
<title><?php echo esc_html( get_the_title() ); ?></title>
<body>
<nav class="navbar">
<?php wp_nav_menu( array(
'theme_location' => '',
'menu' => '',
'container' => 'ul',
'container_class' => '',
'container_id' => '',
'menu_class' => 'menu',
'menu_id' => '',
'echo' => true,
'fallback_cb' => 'wp_page_menu',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id = "%1$s" class = "%2$s">%3$s</ul>',
'depth' => 0,
'walker' => '',
) ); ?>
</nav>
<!-- index.php -->
<?php get_header(); ?>
<?php get_sidebar(); ?>
<main>
<section>
<?php if( have_posts() ){ while( have_posts() ){ the_post(); ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<time><?php echo get_the_date(); ?></time> <span class="author"><?php the_author(); ?></span>
<p><?php the_content(); ?></p>
<hr>
<?php } /* конец while */ ?>
<?php next_posts_link(); ?>
<?php previous_posts_link(); ?>
<?php
} // конец if
else
echo "<h2>Записей нет.</h2>";?>
</section>
</main>
<?php
// get_sidebar();
get_footer();
<!-- footer.php -->
<footer><nav>Название Блога</nav></footer>
</body>
</html>
<!-- single.php -->
<?php get_header();?>
<?php get_sidebar(); ?>
<main>
<section>
<p><?php the_post();?></p>
<?php
get_template_part( 'template-parts/content', get_post_type() );
// 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;
?>
</section>
</main>
<?php
get_footer(); ?>
<!-- page.php -->
<?php get_header();?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
// 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;
endwhile; // End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_sidebar();
get_footer(); ?>
<!-- header.php -->
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<link rel="stylesheet" href="<?php bloginfo('template_directory') ?>\css\style.css">
<link rel="stylesheet" href="<?php bloginfo('template_directory') ?>\css\mediaStyle.css">
<meta charset="UTF-8">
<title><?php echo esc_html( get_the_title() ); ?></title>
<body>
<nav class="navbar">
<?php wp_nav_menu( array(
'theme_location' => '',
'menu' => '',
'container' => 'ul',
'container_class' => '',
'container_id' => '',
'menu_class' => 'menu',
'menu_id' => '',
'echo' => true,
'fallback_cb' => 'wp_page_menu',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id = "%1$s" class = "%2$s">%3$s</ul>',
'depth' => 0,
'walker' => '',
) ); ?>
</nav>
<!-- index.php -->
<?php get_header(); ?>
<?php get_sidebar(); ?>
<main>
<section>
<?php if( have_posts() ){ while( have_posts() ){ the_post(); ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<time><?php echo get_the_date(); ?></time> <span class="author"><?php the_author(); ?></span>
<p><?php the_content(); ?></p>
<hr>
<?php } /* конец while */ ?>
<?php next_posts_link(); ?>
<?php previous_posts_link(); ?>
<?php
} // конец if
else
echo "<h2>Записей нет.</h2>";?>
</section>
</main>
<?php
// get_sidebar();
get_footer();
<!-- footer.php -->
<footer><nav>Название Блога</nav></footer>
</body>
</html>
<!-- single.php -->
<?php get_header();?>
<?php get_sidebar(); ?>
<main>
<section>
<p><?php the_post();?></p>
<?php
get_template_part( 'template-parts/content', get_post_type() );
// 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;
?>
</section>
</main>
<?php
get_footer(); ?>
<!-- page.php -->
<?php get_header();?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
// 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;
endwhile; // End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_sidebar();
get_footer(); ?>