我编辑了一个新页面,这里是内容。
发布并查看它。
为什么没有显示? 主题是“二十四”。
sudo cat /var/www/html/wp/wp-content/themes/twentyfourteen-child/page.php
<?php /* Template Name: Custom Front Page */ ?>
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other ‘pages’ on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/
get_header(); ?>
<div id=”main-content” class=”main-content”>
<div id=”primary” class=”content-area”>
<div id=”content” class=”site-content” role=”main”>
<p>it is a test</p>
</div><!– #content –>
</div><!– #primary –>
<?php get_sidebar( ‘content’ ); ?>
</div><!– #main-content –>
<?php
为什么所有的双引号”
而不是"
,单引号是‘
而不是'
?
<?php </* Template Name: Custom Front Page */ ?>
<?php get_header(); ?>
<div id="main-content" class="main-content">
<div id=”primary” class=”content-area”>
<div id="content" class="site-content" role="main">
<?php if(have_posts): while(have_posts): the_post(); ?>
<h1><?php the_title(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
</div>
</div>
<?php get_sidebar( 'content' ); ?>
</div>
<?php get_footer(); ?>
"
和'