Support » Plugins » Change recent articles that display in sidebar (i.e. #11-20)

  • Resolved Storyman

    (@storyman)


    First, let me say I really admire the work done on Word Press and all of the great themes and plugins created by contributors.

    Currently the headlines for the 10 most recent articles are displayed in the sidebar. I’d like to change it to display the headlines for articles 11-20.

    How do I do this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Depends. How are you currently displaying 1-10? Are you using a plugin or widget or template tag or what?

    We don’t know, since you didn’t give us:
    a) a link
    b) a theme name
    c) the code used to display the last 10… etc.

    Thanks for the prompt replies.

    a) The site: http://www.disabilityhappens.com/
    b) Theme used: memoir-10
    c) Code used to display the most recent 10 post:
    $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”)):

    Rather than display the headlines for articles 1-10, I’d like to display the headlines for articles 11-20.

    Thanks for your help.

    By any chance does anyone know if there is a widget that will accomplish this? The theme does work with widgets.

    I’d prefer to just alter the code, so if anyone has a suggestion…

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Simplest way: Change “LIMIT 10” to “LIMIT 10,10”.

    Thanks Otto42. That was exactly what I needed.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change recent articles that display in sidebar (i.e. #11-20)’ is closed to new replies.