Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tokiojoe

    (@tokiojoe)

    Since support seems to be next to non-existent for real issues and ‘fixes’ on the net are dated and don’t work: Here is a hacky method that is guaranteed to work for other pros out there:

    // Include WordPress
    define('WP_USE_THEMES', false);
    require('./wp-load.php');
    $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
    $paged = ($_GET['paged']) ? $_GET['paged'] : 0;
    $per_page=(int)get_option('posts_per_page');
    query_posts('orderby=date&order=DESC&offset='.((int)$paged*$per_page));
    while ( have_posts() ) : the_post();
    echo '<div class="pwrap">';
    echo '<div class="ptitle"><div style="margin-left:5px;">'.the_title('','',false).'</div></div>';
    echo '<div class="pcontent"><div style="margin:5px;">'.get_the_excerpt().'</div></div>';
    echo '<div class="pfooter"><div style="margin-left:5px;">'.get_the_date().' '.get_the_time().'</div></div>';
    echo '</div>';
    endwhile;
    echo '<div style="width:100%;">';
    if($paged!="0"){
    	if($paged=="1"){
    		echo '<a style="position:relative;top:0;left:10px;color:#fff;background:#6E543A;text-decoration:none;" href="./blog.php">Newer Posts</a>';
    	}else{
    		echo '<a style="position:relative;top:0;left:10px;color:#fff;background:#6E543A;text-decoration:none;" href="./blog.php?paged='.(string)((int)$paged-1).'">Newer Posts</a>';
    	}
    }
    if(((int)$paged+$per_page)<($numposts-1)){
    	echo '<a style="position:relative;top:0;left:730px;color:#fff;background:#6E543A;text-decoration:none;" href="./blog.php?paged='.(string)((int)$paged+1).'">Older Posts</a>';
    }
    echo '</div>';
    ?>
    Thread Starter tokiojoe

    (@tokiojoe)

    bump

    any assistance is appreciated. I bumped cause all the posts that buried this one overnight have solutions in the top-10 results on google index.

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