posts AS posts WHERE posts.post_name = '$slug' LIMIT 1"; $posts = $wpdb->get_results("$SQL"); if ($posts) { foreach ($posts as $post) { $found_link = get_permalink($post->ID); } } else { $found_link = "http://www.yoursite.com/blog/"; } ?> Redirecting...

Redirecting...

You can also proceed immediately to .

The main blog URL is www.yoursite.com/blog.