Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress网站;“未找到”;发帖后出错_Php_Wordpress_Http Status Code 404_Posts - Fatal编程技术网

Php Wordpress网站;“未找到”;发帖后出错

Php Wordpress网站;“未找到”;发帖后出错,php,wordpress,http-status-code-404,posts,Php,Wordpress,Http Status Code 404,Posts,我最近使用WordPress 3.5.2创建了一个网站,我正在使用一个名为“定制社区”的主题。无论如何,我最近注意到,在我的主页底部显示以下错误消息: 未找到 抱歉,您正在查找不在这里的内容 我意识到这个错误是要在没有帖子时显示的。然而,我的页面确实有帖子。只有两个,一个是自动的“HelloWorld”帖子,另一个是我做的测试帖子。但是,即使是这样,也应该停止显示错误消息。然而,正如你在网站上看到的那样,它仍然存在 据我所知,该错误消息由主索引文件(Index.php)控制,并在没有帖子时显示。

我最近使用WordPress 3.5.2创建了一个网站,我正在使用一个名为“定制社区”的主题。无论如何,我最近注意到,在我的主页底部显示以下错误消息:

未找到

抱歉,您正在查找不在这里的内容

我意识到这个错误是要在没有帖子时显示的。然而,我的页面确实有帖子。只有两个,一个是自动的“HelloWorld”帖子,另一个是我做的测试帖子。但是,即使是这样,也应该停止显示错误消息。然而,正如你在网站上看到的那样,它仍然存在

据我所知,该错误消息由主索引文件(
Index.php
)控制,并在没有帖子时显示。请注意,以下是该文件的副本:

<?php
global $cap;
global $wp_query;
get_header()
?>

<div id="content" class="span8">
    <div class="padder">
        <div class="clear"></div>

        <?php do_action('bp_before_blog_home'); ?>

        <?php
        if ($cap->posts_lists_style_home == 'magazine') {
            $args = array();
            $args['amount']       = get_option('posts_per_page', 9);
            $args['img_position'] = cc_get_magazine_style($cap->magazine_style_home);

            echo cc_list_posts($args); ?>

            <div class="navigation">
                <div class="alignleft"><?php next_posts_link(__('← Previous Entries', 'cc')) ?></div>
                <div class="alignright"><?php previous_posts_link(__('Next Entries →', 'cc')) ?></div>
            </div>
        <?php
        } else { // blog
        ?>
            <div class="clear"></div>
            <div class="page" id="blog-latest">

                <?php if (have_posts()) : ?>

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

                        <?php do_action('bp_before_blog_post') ?>

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

                            <div class="author-box visible-desktop">
                                <?php echo get_avatar(get_the_author_meta('user_email'), '50'); ?>

                                <?php cc_author_link(); ?>
                            </div>

                            <div class="post-content span11">

                                <span class="marker visible-desktop"></span>

                                <h2 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent Link to', 'cc') ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

                                <p class="date"><?php the_time('F j, Y') ?> <em><?php _e('in', 'cc') ?> <?php the_category(', ') ?> <?php cc_author_link(); ?></em></p>

                                <div class="entry">
                                    <?php do_action('blog_post_entry') ?>
                                </div>

                                <?php $tags = get_the_tags();
                                if ($tags) { ?>
                                    <p class="postmetadata"><span class="tags"><?php the_tags(__('Tags: ', 'cc'), ', ', '<br />'); ?></span> <span class="comments"><?php comments_popup_link(__('No Comments »', 'cc'), __('1 Comment »', 'cc'), __('% Comments »', 'cc')); ?></span></p>
                                <?php } else { ?>
                                    <p class="postmetadata"><span class="comments"><?php comments_popup_link(__('No Comments »', 'cc'), __('1 Comment »', 'cc'), __('% Comments »', 'cc')); ?></span></p>
                                <?php } ?>
                            </div>

                        </div>

                            <?php do_action('bp_after_blog_post') ?>

                        <?php endwhile; ?>

                    <?php if(function_exists('wp_pagenavi')): ?>
                        <?php wp_pagenavi(); ?>
                    <?php else: ?>
                        <div class="pagination">
                            <?php
                            $big = 999999999; // need an unlikely integer

                            echo paginate_links(array(
                                'base'    => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
                                'format'  => '?paged=%#%',
                                'current' => max(1, get_query_var('paged')),
                                'total'   => $wp_query->max_num_pages
                            ));
                            ?>
                        </div>
                    <?php endif;?>

                <?php else : ?>

                    <h2 class="center"><?php _e('Not Found', 'cc') ?></h2>
                    <p class="center"><?php _e('Sorry, but you are looking for something that isn\'t here.', 'cc') ?></p>

                    <?php locate_template(array('searchform.php'), true) ?>

                <?php endif; ?>
                    </div>
                <?php } ?>

        <?php do_action('bp_after_blog_home') ?>

    </div><!-- .padder -->
</div><!-- #content -->

<?php get_footer() ?>


我可以在你的网站上看到这两篇博文。代码
似乎就是让你的帖子出现的代码。你有没有随附任何文档?所有的设置都正确吗?谢谢,我知道这两篇博文是可见的。问题是,错误出现在帖子之外。我收到的唯一文档是一个基本的安装指南,它是无用的,因为我知道如何安装主题。但是,现在我看了一下,当我使用不同的主题时,错误没有出现,因此主题一定有问题。您的设置-->读取“首页显示”的配置中有什么?