Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter signum_ignitum

    (@thrica)

    “I may be wrong, but don’t you need to SELECT post_date along with ID, and post_title?”
    Spot on; that fixed it. SQL syntax and usage is still pretty foreign to me, so I appreciate the help!

    Thread Starter signum_ignitum

    (@thrica)

    It outputs a list of the most recent topics, from $start to $limit. The category appears before it (<div class=”postcat”>), and once I get the date output, that should appear before the category (<div class=”date”>, and the two divs within).

    Forum: Plugins
    In reply to: Have an idea for a plugin?

    Huh. I guess I’ve been looking in the wrong places. Thanks.

    Thread Starter signum_ignitum

    (@thrica)

    It’s a different foreach, inside a plugin.

    function get_recent_posts($current_id, $start, $limit) {
    	global $wpdb, $post;
        $posts = $wpdb->get_results("SELECT ID, post_title FROM " . $wpdb->posts . " WHERE post_status='publish' ORDER BY post_date DESC LIMIT " . $limit);
        for ( $c = 0; $c < $start; $c++) {
        	unset($posts[$c]);
        }
        foreach ($posts as $post) {
        	$post_title = stripslashes($post->post_title);
            $permalink  = get_permalink($post->ID);
            $cid = get_the_category_id($post->ID);
            if ($post->ID != $current_id) echo "<li class='hoverlight'>
            <div class='date'><div class='month'>" . mysql2date('M',$post->post_date) . "</div><div class='day'>" . mysql2date('d',$post->post_date) . "</div></div>\n
            <div class='postcat'><a href='" . get_category_link($cid) . "' class='cat" . $cid . "' title='" . get_the_category_by_ID($cid). "'></a></div>\n
            <h2><a href=\"" . $permalink . "\">" . $post_title . "</a></h2></li>\n";
        }
    }

    Is what I have so far.

    Forum: Plugins
    In reply to: Have an idea for a plugin?

    How about a true pagination system for WordPress – i.e., on search results, instead of moving forward and backwards through who knows how many pages of them, have links at the bottom to page 1, 2, 3, etc. of search results. This would also apply to any of the other pages (archives, etc.) where there are the forward/backward links.

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