Ingredient
if (isset($_GET['ing'])) {
$ing = $_GET['ing'];
$query = "tag=" . $ing;
$nquery="name=" . $ing;
// Look up the post with "Tag" as the name
query_posts($nquery);
if ( have_posts() ) : while ( have_posts() ) : the_post();
echo the_content();
endwhile; else:
echo "No post with Tag Title found!
“;
endif;
//Reset Query
wp_reset_query();
//The Query
query_posts($query);
echo “
The following post have the ” . ucwords(strtolower(str_replace(“-”, ” “, $ing))) . ” Tag:
“;
echo “
- “;
- ‘ . the_title( “”, “”, false ) . ‘
- No Post with matching Tags were found.
//The Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();
echo ‘
‘;
endwhile; else:
echo “
“;
endif;
echo “
“;
//Reset Query
wp_reset_query();
} else {
echo “
I got nothing!
“;
}
?>

SK Store
Become a Fan
Follow Me
Subscribe




