• The following is a portion of code from my function.php:

    $recent = new WP_Query();
    $catID = "3";
    $recent->query("cat=$catID");

    $catID = “3” works.
    $catID = “4” works.
    $catID = “23” does NOT work.

    In order to get a double digit variable to work, I have to change the double quotes in $recent->query to single quotes. But, with single quotes, the single digit variable will not work.

    The problem comes when I loop this function and some variables are single digits, some double.

    Thank you for any help you may be able to offer.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘$recent->query of cat problem’ is closed to new replies.