对于我的客户端站点,当我尝试创建新页面并发布设计视图时,设计视图被破坏了,但博客帖子视图显示正确,该站点使用了以前的开发人员开发的自定义WordPress主题。
Wp站点:http://blog.biblesforamerica.org
页码:http://blog.biblesforamerica.org/online-bible-studies-bibles-america/
如何做到这一点?
这是单曲的代码。页php
<div id="primary" class="content-area">
<main id="main" class="site-main" role="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();
以下是内容代码。php
<?php
/**
* Template part for displaying posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Blog
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
if ( is_single() ) :
the_title( \'<h1 class="entry-title">\', \'</h1>\' );
else :
the_title( \'<h2 class="entry-title"><a href="\' . esc_url( get_permalink() ) . \'" rel="bookmark" >\', \'</a></h2>\' );
endif;
if ( \'post\' === get_post_type() ) : ?>
<h4 class="meta text-muted">
<?php bfablog_posted_on(); ?>
</h4><!-- .entry-meta -->
<?php
endif; ?>
<!-- AddThis Button BEGIN -->
<div class="addthis_inline_share_toolbox_mzc3" style="margin-bottom:20px;" data-title="<?php the_title() ?>" data-url="<?php the_permalink(); ?>" </div>
<!-- AddThis Button END -->
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content( sprintf (
/* translators: %s: Name of current post. */
wp_kses(__( \'Read more\', \'bfablog\' ), array( \'span\' => array( \'class\' =>
array() ) ) ),
the_title( \'<span class="screen-reader-text">"\', \'"</span>\', false )
) );
wp_link_pages( array(
\'before\' => \'<div class= "page-links">\'. esc_html__(\'Pages:\', \'bfablog\'
),
\'after\' => \'</div>\',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php bfablog_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<hr>
<script type="text/javascript">
var addthis_config = {
ui_language: "{{ site.lang }}"
};
var addthis_share =
{
// ... members go here
}
</script>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-586c401922d76d24"></script>
以下是内容页的代码。php
<?php
/**
* Template part for displaying page content in page.php
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package BfA_Blog
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( \'<h1 class="entry-title">\', \'</h1>\' ); ?>
</header><!-- .entry-header -->
<div class="entry-content"><hr>
<?php
the_content();
wp_link_pages(array(
\'before\' => \'<div class="page-links">\' . esc_html__(\'Pages:\',\'bfablog\'),
\'after\' => \'</div>\',
) );
?>
</div><!-- .entry-content -->
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( \'Edit %s\', \'bfablog\' ),
the_title( \'<span class="screen-reader-text">"\', \'"</span>\', false )
),
\'<span class="edit-link">\',
\'</span>\'
);
?>
</footer><!-- .entry-footer -->
<?php endif; ?>
</article><!-- #post-## -->
他为博客帖子列表页面创建了内容。php,并为这篇文章创建了内容页。php
如何做到这一点?