Support » Fixing WordPress » "Not Found" Error Appearing at the End of My Posts (Custom Community Theme)

  • I have recently created a website using WordPress 3.5.2, and I’m using a theme called “Custom Community”. Anyway, I recently noticed that, at the bottom of my home page, the following error message is displayed:

    Not Found

    Sorry, but you are looking for something that isn’t here.

    I realize that this error is meant to be displayed when there are no posts. However, my page DOES have posts. There are only two, the automatic “Hello World” post, and a test post I made. However, even one should stop the error message from being displayed. Yet it is there nonetheless, as you can see at

    I have seen other users’ posts of similar problems, but none seem exactly the same as mine. Some say they have posts that aren’t showing up, others say it only happens when they are logged in as the admin. For me, however, the error message shows up in addition to the posts, and it persists regardless of whether I am logged in or not.

    As far as I am aware, that error message is controlled by the Main Index File (index.php), and is meant to show up if there are no posts. On that note, here is a copy of that file:

    global $cap;
    global $wp_query;
    <div id="content" class="span8">
        <div class="padder">
            <div class="clear"></div>
            <?php do_action('bp_before_blog_home'); ?>
            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>
            } 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 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') ?>
                                    <?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 } ?>
                                <?php do_action('bp_after_blog_post') ?>
                            <?php endwhile; ?>
                        <?php if(function_exists('wp_pagenavi')): ?>
                            <?php wp_pagenavi(); ?>
                        <?php else: ?>
                            <div class="pagination">
                                $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
                        <?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; ?>
                    <?php } ?>
            <?php do_action('bp_after_blog_home') ?>
        </div><!-- .padder -->
    </div><!-- #content -->
    <?php get_footer() ?>

    Thank you in advance for your assistance.

    P.S. I have only just started making the site, so please avoid pointing out any problems that do not pertain to the issue currently in question. Thank you.

Viewing 1 replies (of 1 total)
  • we had the same exact problem. In that code you have i just went down and deleted the two lines and it took care of the problem. I’m NOT AN EXPERT though. But that worked for me.

Viewing 1 replies (of 1 total)
  • The topic ‘"Not Found" Error Appearing at the End of My Posts (Custom Community Theme)’ is closed to new replies.