Variable on query_posts isn't working
-
Hey guys,
I’m working on a little project which requires me to do something based on the category name of a post. The whole thing is working exactly as it should… but when I look at the site, I get an error message:
Notice: Undefined variable: cat_name
. Note that I do get the results I need, but there still is the message.If anyone knows what I’m doing wrong, that would be great.
This is the code:
<?php query_posts('category_name=zoekennaar' . $cat_name); $content = get_post_field('post_content', $cat_name); $content = explode('|', $content); foreach ($content as &$zoekenNaar) $zoekenNaar = explode(':',$zoekenNaar); echo '<pre>'; print_r($content); echo '</pre>'; ?>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Variable on query_posts isn't working’ is closed to new replies.