Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter semaja2

    (@semaja2)

    anyone?

    Thread Starter semaja2

    (@semaja2)

    please someone help out?

    I believe that the query is causing you problems:


    <?php $amonth = substr($m,4); ?>
    <?php $ayear = substr($m,0,4); ?>
    <?php query_posts('posts_per_page=-1&monthnum='.$amonth.'&year'.$ayear); ?>

    When I disable permalinks on my test blog the above works correctly, but if I enable it then it shows all entries. If you remove the query, the loop will build the query for you correctly on the archives page.

    This is probably because without permalinks, ?m= is used on the URL, but with permalinks it is not. If you want to format the date differently for the archives, you can get the first post and use the_time() on it.

    Thread Starter semaja2

    (@semaja2)

    ok well i fixed that but now the categories are broken, they only list 5 posts for multialarm but there is actually about 20

    <?php get_header(); ?>

    <div id=”main”>
    <div id=”content”>

    <div class=”entry”>
    <h1>Browsing the <?php $catname = get_the_category(); echo $catname[0]->cat_name; ?> category</h1>
    Below is a list of every entry made in the <?php echo $catname[0]->cat_name; ?> category.

    <ul id=”archivelist”>
    <?php while(have_posts()) : the_post() ?>

    • <span><?php the_time(‘d. M Y’); ?></span> ” title=”Read <?php the_title(); ?>”><?php the_title(); ?>
    • <?php endwhile; ?>

      <script type=”text/javascript”><!–
      google_ad_client = “pub-5841443599987490”;
      google_ad_width = 468;
      google_ad_height = 60;
      google_ad_format = “468x60_as”;
      google_ad_type = “text_image”;
      google_ad_channel =””;
      google_color_border = “336699”;
      google_color_bg = “FFFFFF”;
      google_color_link = “0000FF”;
      google_color_url = “008000”;
      google_color_text = “000000”;
      //–></script>
      <div class=”center”><script type=”text/javascript”
      src=”https://pagead2.googlesyndication.com/pagead/show_ads.js”&gt;
      </script></div>

      </div>

      </div>

      <?php get_sidebar(); ?>

      <?php get_footer(); ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Archives not working’ is closed to new replies.