Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Forum: Plugins
    In reply to: Future Posts on a page?

    Slightly going off topic now: did you check the number of posts in settings > read? Else try ‘showposts=-1’ instead. If that doesn’t work, best start a new thread.

    Forum: Plugins
    In reply to: Future Posts on a page?

    Well, it looks as if your checking the dates too late. First check if there is a post. If so, check the date. Then do the html.

    I did some reshuffling in your code. Didn’t test it, though.

    <?php
    
      get_header();
    
      if (have_posts()): ?>
    
      <ol id="posts"><?php query_posts('cat=3&posts_per_page=10&orderby=date&order=ASC'); ?>
    <?php while ( have_posts() ) : the_post() ?> 
    
    <?php  //check the dates
    $post_date = mysql2date("Ymd", $post->post_date_gmt);
    $currentdate = date("Ymd", strtotime('-1 day'));
    $expirationdate = $post_date;
    if ( $expirationdate > $currentdate ) { ?>
    
        <li class="postWrapper" id="post-<?php the_ID(); ?>">
    
          <h2 class="postTitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
          <small><?php the_date(); ?> by <?php the_author(); ?></small>
    
          <div class="post"><?php the_content(__('(more...)')); ?></div>
          <p class="postMeta">Category: <?php the_category(', ') . " " . the_tags(__('Tags: '), ', ', ' | ') . comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')) . edit_post_link(__('Edit'), ' | '); ?></p>
    
          <hr class="noCss" />
        </li>
    
        <?php comments_template(); // Get wp-comments.php template ?>
    
    <?php } //end date check ?>
        <?php endwhile; ?>
    
      </ol>
    
    <?php else: ?>
    
      <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    
    <?php
    
      endif;
      ?>
    
      <?php if (will_paginate()): ?>
    
        <ul id="pagination">
          <li class="previous"><?php posts_nav_link('','','&laquo; Previous Entries') ?></li>
          <li class="future"><?php posts_nav_link('','Next Entries &raquo;','') ?></li>
        </ul>
    
      <?php endif; ?>
    
      <?php
      get_footer();
    ?>
    Forum: Plugins
    In reply to: Future Posts on a page?

    I’m using them on 2.6.5.

    I’m having the same problem. The xml-file is being made without a closing </urlset>. If I manually add this, it’s okay.

    Memory limit is 32M (needed: 16.75M according to the feedback I get from the plugin), time used to process: 1.14 seconds and 371 posts were added to the sitemap.

    Suggestions on how to fix this are more than welcome!

    Forum: Plugins
    In reply to: Future Posts on a page?

    I took a different approach to get a list of upcoming events (using the future is now-plugin).

    <?php query_posts('cat=5&posts_per_page=5&orderby=date&order=ASC'); ?>
    <?php while ( have_posts() ) : the_post() ?> <!--loop-->
    
    <?php  //check the dates
    $post_date = mysql2date("Ymd", $post->post_date_gmt);
    $currentdate = date("Ymd", strtotime('-1 day'));
    $expirationdate = $post_date;
    if ( $expirationdate > $currentdate ) { ?>
    
    <!-- add your html here -->
    
    <?php } //end date check ?>
    <?php endwhile ?><!-- end loop -->

    The code returns a list of the next 5 events in category 5 (i.e. events). Todays events are listed as well because of the strtotime.

    No need to change any of the core files. Just put this code in your sidebar to get upcoming events.

    Justin Tadlock’s Get-the-Image-plugin. Works like a charm.

    Thread Starter disbas

    (@disbas)

    Well, I just added a mod_deflate to the htaccess. Maybe that helped. It should. ??

    I’ll try to post some code regarding the YT-thumbs tomorrow.

    Forum: Your WordPress
    In reply to: My site

    I’m getting an ‘error establishing dtabase connection’.

    Thread Starter disbas

    (@disbas)

    Although the site does score a F on Yslow (160k in pics, some 100k js), I never thought this would actually be a problem for overseas visitors. Good thing the content is only in Dutch.. ??

    Seriously:
    YSlow loading time: 1.801 seconds (cached js and pics)
    After cleaning the buffer twice: 2.801 seconds.

    Anybody else experiencing problems visiting the site?

    Thread Starter disbas

    (@disbas)

    Huh? Are you on a dial up, then? Never had any complaints on loading times.. Anybody else encountering this?

    Cool.

    Your site doesn’t validate because a plugin you use doesn’t validate. Check out a plugin called wp-dtree-30. language=javascript should be type=text/javascript.

    If anything you may want to have a look at the uppermost coffee stain. Why does it suddenly stop? I’d would look so much better if the bg-image would be aligned to the top of the browser.

    Personally I always add a #wpstats {display:none;} to the stylesheet if I use the stats plugin. But if the smiley doesn’t bother you..

    Nice and clean.

Viewing 12 replies - 1 through 12 (of 12 total)