Forums

[resolved] Permalinks not working on index.php (8 posts)

  1. fitzio
    Member
    Posted 1 year ago #

    I customized a theme from a tutorial: http://www.webdesignerwall.com/tutorials/building-custom-wordpress-theme/

    Permalinks are not working on index.php, but are working on all other pages.(single) I get a 404 in my home page. See: blog.utterlyorganized.net. I tried changing permissions on .htaccess. Could there be something wrong with my index page? The index page displays recent posts as it should when permalinks is set to default.

    PHP is not my strong suit. Here is the call in the index page:
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="post">
    <div class="post-date"><span class="post-month"><?php the_time('M') ?></span> <span class="post-day"><?php the_time('j') ?> <?php the_pageview(); ?></span></div>
    <div class="post-title">
    <h2>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2>
    <span class="post-cat"><?php the_category(', ') ?></span>
    <span class="post-comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span>
    </div>
    <div class="entry">
    <?php the_content('Read the rest of this entry »'); ?>
    </div>
    </div>

    <?php endwhile; ?>

    <div class="navigation">
    <span class="previous-entries"><?php next_posts_link('Older Entries') ?></span>
    <span class="next-entries"><?php previous_posts_link('Newer Entries') ?></span>
    </div>

    <?php else : ?>

    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that isn't here.</p>

    <?php endif; ?>

    I will try a different theme, but would like some input on finding and fixing the problem. Thanks!

  2. keesiemeijer
    moderator
    Posted 1 year ago #

    Have you tried:
    - setting your permalink structure at Settings/Permalinks in your admin panel to the default structure.

    - deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-specific problems?

    It is also possible that you will have to chmod any folders that are 777 to 755 if you are on php5

  3. tanialazib
    Member
    Posted 1 year ago #

    Hi,
    Am interested what you find out as am having the exact same problem. index.php is the only page it doesn't work on.
    Tania

  4. fitzio
    Member
    Posted 1 year ago #

    Thanks, keesiemeijer:
    When permalinks are set to default structure, posts on index work as they should.
    Deactivating plugins did not help.
    The problem exists in the default theme.
    I am on php5 and will try: chmod folders from 777 to 755

  5. fitzio
    Member
    Posted 1 year ago #

    nope. Folders were all already 755

  6. keesiemeijer
    moderator
    Posted 1 year ago #

    And if you put your permalinks back to the structure you had it stops working?

  7. fitzio
    Member
    Posted 1 year ago #

    Yes. with default structure, Posts show in index.php
    With any other structure, posts are replaced by 404 error

  8. fitzio
    Member
    Posted 1 year ago #

    Hey All and Tania.
    Turns out, my problem was in a redirect. The actual URL for the WP site was:
    http://www.domain.name/blog
    I set up the hosting account with a subdomain:
    http://blog.domain.name - that redirects to http://www.domain.name/blog

    Turns out, I had the subdomain redirect (http://blog.domain.name) listed in the URL field in the General Settings panel in the WP control panel, when what it really wanted was the actual URL. When I set the WordPress Address (URL) and the Site address (URL) to the actual location, the problem was resolved. Goofy mistake. Thanks for your feedback.

Topic Closed

This topic has been closed to new replies.

About this Topic