• I read through Podz’ tutorial on implementing Matt’s Asides with WP1.2 and since I have other hacks (hide category posts, page navigation) in the same area, I have no hope of figuring out how to alter the asides hack to work with my index file.
    <div id="content">
    <?php if (isset($_GET['m']) || (isset($_GET['year']) && !($single))) { ?>
    <?php previous_archive_date('« ',' |'); ?> ">Main <?php next_archive_date('| ',' »') ?>
    <?php } ?>
    <?php hide_category_posts('category=3,5&hide_always=true'); ?>
    <?php if ($hcp_posts) : foreach ($hcp_posts as $post) : start_wp(); ?>
    <?php if($single){
    previous_post('%','&#171 Previous Entry','no','no',1,''); ?> |
    ">Main |
    <?php next_post('%','Next Entry »','no','no',1,'');
    } ?>
    <?php the_date('','<h2>','</h2>'); ?>
    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h3>
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> &nbsp;by <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class="storycontent">
    <?php the_content('more »','',''); ?>
    </div>

    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Discuss » (0)'), __('Discuss » (1)'), __('Discuss » (%)')); ?>
    </div>
    <!--<?php trackback_rdf(); ?>-->
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    </div>

    There’s my loop (or you can look for yourself at http://www.sportfolio.sportsintel.net) I can cut and paste, but I have almost no understanding of PHP. I believe that I just need help with the first part of Podz’ tutorial, that is, how to start the loop. It seems the remainder would be the same even for my hacked up index?
    Any help would be greatly appreciated. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • oops, that was me, sorry.

    I think I did the following to getting hide categories & asides working together:
    I have copied and changed the first parts of podz’s guide:
    In index.php, find this line:
    <?php if ($hcp_posts) : foreach ($hcp_posts as $post) : start_wp(); ?>
    Comment it out like this:
    <?php // if ($hcp_posts) : foreach ($hcp_posts as $post) : start_wp(); ?>
    Right under that, paste this:
    <?php
    if ($hcp_posts) {
    function stupid_hack($str) {
    return preg_replace('|
    s*<ul class="linklog">|', '', $str);
    } ob_start('stupid_hack');
    foreach($hcp_posts as $post) { start_wp();
    ?>
    The next line should be your date call....

    Your code suggestion worked perfectly. Thanks much. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Matt’s Asides with other Loop Hacks’ is closed to new replies.