0

我的 Wordpress 网站真的没有按照我想要的方式运行?!

它工作正常,没有任何东西被触及,然后最近我发现每一页都在每一页上显示相同的内容。不是所见即所得编辑器中的单个内容。

这让我很头疼,我有一个修改过的主题,我已经用原始主题文件 page.php、index.php 和 single.php 替换了它,看看它们页面是否有问题。但它不是!?

链接是http://www.alleanza.co.uk,我本来想在最后的婚礼上把它交出来,但我仍然不能,因为没有内容被拉过。有没有人有任何可能有帮助的想法?

但是我注意到它是从 Hello World Post 中提取信息,而不是从页面的所见即所得内容中提取信息。

但是,这是 page.php 的内容

<?php
/*
Template Name: Normal Template
*/
?>

<?php get_header(); ?>

    <div id="content">
    <div id="greybread"><?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?></div>

<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">

                <?php while ( have_posts() ) : the_post(); ?>

                    <?php the_content(); ?>

                    <?php comments_template( '', true ); ?>

                <?php endwhile; // end of the loop. ?>


    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    </div></div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
4

2 回答 2

0

您能否在循环内显示您在 page.php 中的代码?

如果<php the_content(); ?>在循环中缺少标签,您将看不到从 Wordpress 仪表板加载的内容。这也可能是因为您从页面属性模块中为您的页面选择了非默认模板。

于 2012-05-04T15:17:55.780 回答
0

请注意,您已经在 page.php 中指定了模板名称(模板名称:普通模板)。这意味着这不再是默认模板。如果要将其设为所有页面的默认模板,请删除 get_header() 标记之前的行。(http://codex.wordpress.org/Pages#What_Template_is_used_to_Display_a_Particular_Page.3F)

或者,您可以选择“普通模板”作为“编辑”页面上的页面属性下的页面模板。见下文:

http://en.support.wordpress.com/pages/page-attributes/#template

于 2012-05-04T15:45:46.880 回答