.htaccess and 404 pages (7 posts)

  1. scofield888
    Posted 6 years ago #


    I'm currently working on a site and I've been having problems with my pages navigation. I'm currently using the "WP-Pagenavi" plugin.

    Homepage: http://www.thecreditcardguide.com.au/

    Category: http://www.thecreditcardguide.com.au/low-balance-transfer

    On the homepage, when you click on "2" to go to the next page, it works just fine.

    But on the category, when you click on "2", it redirects me to a 404 page.

    I have tried several fixes but none of them worked for me.





    I really have no idea why it's suddenly now working anymore. Is it a problem with WP-Pagenavi, .htaccess or another plugin?

    Hoping for some great solution to this problem. Thanks a lot in advance!

  2. Lester Chan
    Posted 6 years ago #

    Does it happen on the default theme? If it does not happen on the default theme, means there is a problem with query_post() in your category.php or archive.php.

    You may want to read http://codex.wordpress.org/Template_Tags/query_posts you need to pass in $query_string variable to the query_post()

  3. scofield888
    Posted 6 years ago #

    Yes. I tried using the default theme and this problem also happens. The current permalink structure is: /%category%/%postname%/.

    Do you think that this might have something to do with this?

    As for the problem with query_post(), unfortunately, I'm just a newbie in PHP and really can't find a way to make this work. :(

    I'm using the archive.php file and here is the code (hopefully it helps).

    <?php get_header(); ?>

    <?php if (have_posts()) : ?>
    <div class="box post">
    <div class="content">
    <div class="post-title">
    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    <?php /* If this is a category archive */ if (is_category()) { ?>
    <h1><!--Category:--> <span><?php single_cat_title(); ?></span></h1><?php if(category_description()) { echo '<span class="description" style="font-size: 13px;">'.category_description().'</span>'; } ?>
    <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
    <h1><!--Tag:--> <span><?php single_tag_title(); ?></span></h1>
    <?php if(tag_description()) { echo '<span class="description" style="font-size: 13px;">'.tag_description().'</span>'; } ?>
    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    <h1>Archive: <span><?php the_time('F jS, Y'); ?></span></h1>
    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    <h1>Archive: <span><?php the_time('F, Y'); ?></span></h1>
    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    <h1>Archive: <span><?php the_time('Y'); ?></span></h1>
    <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    <h1>Author Archive</h1>
    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    <h1>Blog Archives</h1><?php } ?>
    <!--<div class="tag-description">
    <?php echo tag_description(); ?>

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

    <div class="box post" id="post-<?php the_ID(); ?>">
    <div class="content">
    <div class="rank"><img src="<?php echo get_post_meta($post->ID, 'posts-rank', true); ?>" /></div>
    <?php $postimageurl = get_post_meta($post->ID, 'post-img', true); if ($postimageurl) { ?>
    <div class="pic fl">
    " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php echo $postimageurl; ?>" alt="Post Pic" width="200" height="200" />
    <?php } ?>
    <div class="post-title">
    <h2>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2>
    <!--/post-title -->
    <div class="post-date"><!--On <?php the_time('m.d.y') ?>,--> Category: <?php the_category(', ') ?><!--, by <?php the_author_posts_link(); ?>--></div>
    <div class="post-excerpt"><?php the_excerpt(); ?></div>
    <!--/post-excerpt -->
    <!--/content -->
    <div class="hl"></div>
    <div class="social-links">
    <div class="fl">
    <span><?php comments_number(0, 1, '%'); ?></span>
    #comments" title="View Comments">Comments
    <div class="fr"><span>#respond" title="Post Title - Read more..."><?php the_title(); ?> - Read more...</span></div>
    <br class="fix" />
    <!--/social-links -->
    <!--/box -->

    <?php endwhile; ?>

    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>

    <?php /*

    • <?php next_posts_link('« Older Entries') ?>
    • <?php previous_posts_link('Newer Entries »') ?>

    */ ?>

    <?php else : ?>

    <div class="box post">
    <div class="content">
    <div class="post-title">
    <h1>No Posts Were Found</h1>

    <p style="padding-left: 20px;"> </p>

    <?php endif; ?>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    If you guys think that my questions are a bit out of place, please don't hesitate to let me know.

    Thanks again! ;)

  4. scofield888
    Posted 6 years ago #


  5. scofield888
    Posted 6 years ago #

    can anyone please help? :)

  6. Hayden James
    Posted 5 years ago #

    wow. Looking at this I wonder if I will every get help for my thread. Did you ever figure this out?

  7. SEObomj
    Posted 5 years ago #

    the analog rubbish

Topic Closed

This topic has been closed to new replies.

About this Topic