• paulgobble

    (@paulgobble)


    Can anyone spot what I’m doing wrong? Take a look at this Page

    https://www.sbox.net/blogrd105/?page_id=126

    I’m building a custom Page template. I’m trying to use query_posts() with a custom query string, like this
    <?php $testDate = ''2005-02-23 23:59:59''; ?>
    <?php $theQuery = ''post_date>' . $testDate . '''; ?>
    <?php query_posts($theQuery);???>

    Without our using string variables, the code would look like this
    <?php query_posts('post_date >= '2005-02-23 23:59:59''); ?>

    So far, I haven’t been able to format the parameter for query_posts() properly – at least that’s my theory. What am I doing wrong?

Viewing 1 replies (of 1 total)
  • Thread Starter paulgobble

    (@paulgobble)

    Some of my quoting is being changed in the post above. Some of those double/tripple quotes are escaped single quotes.

Viewing 1 replies (of 1 total)
  • The topic ‘Using query_posts() function’ is closed to new replies.