• djmaru

    (@djmaru)


    using this template: http://www.jpardue.web.cedant.com/blog/

    i only want the links under MySCripts to list category three. i’ve played and tweaked with my code to no avail. can someone exaplain how to make this happen? the code in question is below. thanks in advance.

    <?php
    
    $today = current_time('mysql', 1);
    
    if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 10")): 
    
    ?>
    
    <ul>
    <?php
    
    foreach ($recentposts as $post) {
    
    if ($post->post_title == '')
    
    $post->post_title = sprintf(__('Post #%s'), $post->ID);
    
    echo "
    <li><a>ID)."'>";
    
    the_title();
    
    echo '</a></li>
    ';</ul>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Listing just one category’ is closed to new replies.