WordPress.org

Ready to get started?Download WordPress

Forums

Echo variables inside a function (1 post)

  1. John Peden
    Member
    Posted 3 years ago #

    Just started making inroads into coding my first plugin. I've got a widget that displays three tabs of post titles in a tabbed menu. The first tab currently displays the most commented posts written in the last 30 days. I'm using this filter:

    $where .= " AND post_date > '" . date('Y-m-d', strtotime('-30 days')) . "'";

    I'd like to make the 30 days a user configured variable but don't know how to echo this variable within the where filter.

    How can I make it work?

Topic Closed

This topic has been closed to new replies.

About this Topic