• Hi!

    My posts are shown on by-day basis. I.e. on main pages all posts from current day.

    I wonder, how to make a list of available days in the bottom of main page? I.e. numbers 1 2 3 4 … 100. And when one clicks on 55 for ex., a page is shown with all posts from the day 55 days ago.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Not exactly what you are asking for but this plugin is the closest that comes to my mind:
    https://www.lesterchan.net/portfolio/programming.php
    (PageNavi)

    Thread Starter relo

    (@relo)

    Thanks! That’s what i was searching for, although it doesnt’ correctly show the number of pages if the what_to_show (show either days or XX posts on main page) is days:

    Pages (999999): ? 1 [2] 3 4 5 ? … Last ?

    Any ideas on how to fix that? Mb some request, that shows which days had the posts, and which hadn’t?

    if (get_query_var(‘what_to_show’) == ‘posts’) {
    preg_match(‘#FROM\s(.*)\sGROUP BY#siU’, $request, $matches);
    //preg_match(‘#FROM\s(.*)\sORDER BY#siU’, $request, $matches);
    $fromwhere = $matches[1];
    $numposts = $wpdb->get_var(“SELECT COUNT(DISTINCT ID) FROM $fromwhere”);
    $max_page = ceil($numposts /$posts_per_page);
    } else {
    $max_page = 999999;
    }

    Thread Starter relo

    (@relo)

    bump

    Just a comment, but believe that the Show at most x Days option does not really work in WordPress 2.0.5.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How-to make a list of available posts?’ is closed to new replies.