Forum Replies Created

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter freshyill

    (@freshyill)

    OK, I decided to say screw this ul stuff and do it as a definition list. It works perfectly. If anybody is interested, here’s the code:

    <?php $posts = get_posts( "category=3&days=7" ); ?>
    <?php if( $posts ) : ?>
    <div class="recent">
    <h2>Recent album reviews</h2>
    <dl>
    <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
    <dt><?php the_date('F j'); ?></dt>
    <dd><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></dd>
    <?php endforeach; ?>
    </dl>
    </div>
    <?php endif; ?>

    What a pain. This is the kind of thing that was absolutely simple to do in Movable Type. I’m thoroughly sold on the power of WordPress, but anybody who says it’s easy probably isn’t even fooling themselves.

    Thread Starter freshyill

    (@freshyill)

    OK, I’m getting closer with this. Does anybody have any idea how I might do this? I know there have got to be some people who understand this in here.

    This is the code I’m using:

    <?php $posts = get_posts( "category=3&days=7" ); ?>
    <?php if( $posts ) : ?>
    <div class="recent">
    <h2>Recent album reviews</h2>

    <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
    <h3><?php the_date('F j'); ?></h3>

    <ul>
    <li><a>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></li>
    </ul>
    <?php endforeach; ?>

    </div>
    <?php endif; ?>
    The output I’m getting is now very close to what I actually want, but I’m getting some stuff that I don’t need. The problem is that the list is ending, giving me a blank date spot (which I don’t even need), and then starting a new list for the next item.
    Here’s the output:
    <div class="recent">
    <h2>Recent album reviews</h2>

    <h3>October 4</h3>

    <ul>
    <li><a href="https://crapfilter.net/blog/?p=14&quot; title="Permanent Link to This is the title of an album review">This is the title of an album review</a></li>
    </ul>
    <h3></h3>

    <ul>
    <li><a href="https://crapfilter.net/blog/?p=13&quot; title="Permanent Link to Of course, you should know by now that this is a test">Of course, you should know by now that this is a test</a></li>
    </ul>
    <h3>September 27</h3>

    <ul>
    <li><a href="https://crapfilter.net/blog/?p=7&quot; title="Permanent Link to This is a new thing for some more tests">This is a new thing for some more tests</a></li>
    </ul>
    </div>

    Any help would be greatly appreciated.

    Forum: Plugins
    In reply to: filter on custom fields
    Thread Starter freshyill

    (@freshyill)

    I’ve been trying a few things like this, like subbing in get_post_meta, but that doesn’t work. Can anybody at least tell me if I’m on the right track?

Viewing 3 replies - 16 through 18 (of 18 total)