i have been struggling with querying posts using tags and have found no solutions whatsovever. My idea is to query all wordpress posts having the same tags using query_posts and this just not working and giving weird results
query_posts('cat=-53&tag=best php scripts');
query_posts('cat=-53&tag=best+php+scripts');
query_posts('tag=best,php,scripts');
and tried every combination and it seems to be issue with wordpress 3+ version. Combining with categories also not working.
I have also tried using this code in the single.php page by retrieving tags and querying for posts. It also doesnt work.
$tags = get_the_tags($post->ID);
if ($tags) {
foreach($tags as $tag) {
$tag = $tag->name . '';
}
}
query_posts('cat=-53&tag='.$tag.'');
Still havnt found any solution for this myself.
Similar Posts:
- WordPress similar posts plugin not working?
- How to output category name in WordPress?
- How to post source code in WordPress posts?
- 3 Must Do Things for WordPress Blog Starters
- WordPress – How to get category ID for use in category.php
- How to remove GET variable within $_SERVER['QUERY_STRING'] in PHP
- How to filter & escape data from Injection attacks in PHP!
- 10 Best WordPress PLUGINS You Never want to MISS!
- How to get parent category name in WordPress?
- Free HTML Markup Editor




