$recent->query of cat problem
-
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 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘$recent->query of cat problem’ is closed to new replies.