Forums

Index file in Default Template cannot find my post files (4 posts)

  1. bmedlin
    Member
    Posted 3 years ago #

    I think trying to use a template from the WordPress directory of templates messed up the default. I've double checked and all my "posts" and images etc are all in the godaddy site. From the web (miaandleila.net) I get the default template header and side bar and a 404 File Not Found error. So I think everything is correct until I get to the Index file in the Default theme folder where instead of displaying the posts it is displaying the error page. The posts are in a subfolder to the wp-contect folder called Uploads (that was the default I didn't change anything in setup). So how do I get it to find the posts? Ideas? Thanks in advance for any help.

    Here is the code for the start of the Index page....

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>
  2. MichaelH
    Volunteer
    Posted 3 years ago #

    The posts are in a subfolder to the wp-contect folder called Uploads (that was the default I didn't change anything in setup). So how do I get it to find the posts?

    Just so there is no confusion--a post in WordPress is kept in the wp_posts table of your MySQL database, not in a subfolder of your 'filesystem'. Now uploads, such as images, are usually kept in your wp-content/uploads folder.

  3. bmedlin
    Member
    Posted 3 years ago #

    Got it; yes I confirmed the posts are in the SQL table so any idea why they aren't loading into the page along with the header?

    Thanks so much!

  4. MichaelH
    Volunteer
    Posted 3 years ago #

    Deactivate all plugins, switch to the WordPress Default Theme (assuming you haven't modified the Default theme templates).

Topic Closed

This topic has been closed to new replies.

About this Topic