The loop, fetching from specific cat. with specific tag.
-
Hi there,
I am trying to fetch posts from a specific category that has a specific tag, in my case I want to fetch all posts from my Server Status category that does not have the tag ‘resolved’ and display it on the site. The code I’m trying can be found below.
if (have_posts()) : while (have_posts()) : the_post(); if (!in_category('11')) continue; $tag = get_the_tags(); if ($tag) { $tag = $tag[0]; } if ($tag->name != "resolved") { ?> <h2>Notice: <?PHP the_title(); ?></h2> <?php the_content(); } endwhile; endif; ?>
Right now that don’t work at all and I wonder what I’ve done wrong.. Any assistance is appreciated.
Kind Regards,
dex
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘The loop, fetching from specific cat. with specific tag.’ is closed to new replies.