WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Main Index Template not editable! (8 posts)

  1. XLV
    Member
    Posted 6 years ago #

    I've been successfully editing the Basic template into something that looks alright, but I've hit a huge problem that has me completely stumped.

    In my theme's directory I am editing index.php. I've replaced the code within with code I prepared earlier with my WYSIWYG design software, using all the tags and PHP necessary [as far as I know] from Basic.

    HOWEVER, when I save changes absolutely no difference is made. I even tried removing all code from the file, saving it and it's exactly the same. Posts are displayed unformatted in a single column.

    The file IS saving. The correct theme is selected, but nothing is changing! Could it be that another file is determining layout? Everything else is in place [header, footer, sidebar].

    Many, many thanks in advance. I bet it's really simple. =D

  2. garbonzo
    Member
    Posted 6 years ago #

    Perhaps you're not saving the new index.php into the right place?

  3. XLV
    Member
    Posted 6 years ago #

    ../wp-content/themes/THEME_NAME/index.php

    Is this correct? =[

  4. garbonzo
    Member
    Posted 6 years ago #

    That's correct, but you mentioned that you're using a wsywig... so I thought maybe you were saving the new index.php to your computer and not to the server.

    Okay, let's put it differently: if you edit the index.php from within wordpress's built-in theme editor, and save, does it still refuse to show your changes?

  5. XLV
    Member
    Posted 6 years ago #

    I was first using WordPress' inbuilt editor [it reported no errors, and filesizes changed to confirm that the file was being edited]. When that didn't work I tried saving files locally and FTPing them into place, but still without any effect.

    The site is online, no testing is done locally. The initial design was offline in a WYSIWYG editor simply to get the CSS and basic HTML working.

  6. XLV
    Member
    Posted 6 years ago #

    In case it's down to a poor code job here's the content of index.php:

    <?php get_header(); ?>
    <?php if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>
        <div id="main">
          <div id="loop">
          <div id="postdate"><span class="date"><?php the_time('d') ?></span><br /><span class="month">
          <?php the_time('M') ?></span></div>
          <div id="posttitle"><a href="<?php the_permalink() ?>" title="Read ‘<?php the_title(); ?>’"><?php the_title(); ?></a></div>
          <div id="postcontent">
            <?php the_content('Read the rest of this entry &raquo;'); ?>
          </div>
          <div id="postfooter">Posted by <?php the_author() ?> under ‘<?php the_category(', ') ?>’. <?php edit_post_link(); ?></div>
        </div>
    	<?php endwhile; ?>
    
    	<p>
    		<span><?php posts_nav_link('','','&laquo; Previous Entries') ?></span>
    		<span><?php posts_nav_link('','Next Entries &raquo;','') ?></span>
    	</p>
    
    <?php else : ?>
    
    	<h3>No Results Returned</h3>
    	<p>
    		<?php _e("Sorry, your search produced no results. If you did not perform a search it is possible that a website error is preventing your access. If so, please contact us."); ?>
    	</p>
    	<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    <?php endif; ?>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  7. XLV
    Member
    Posted 6 years ago #

    Thanks for your help garbonzo. It's much appreciated. I simply overlooked my selected Options. I was using a page for my homepage, no displaying posts. Which explains why editing index.php was ineffectual when looking at the homepage. I really couldn't work it out! Thanks again! :)

  8. nidhika
    Member
    Posted 6 years ago #

    How made save changes in Presentation->Theme editor->main index template in wordpress

Topic Closed

This topic has been closed to new replies.

About this Topic