$slugtag = $_GET['title']; ?> $slugtag = strtolower($slugtag); ?> $slugtag = str_replace(" ", "-", $slugtag); ?> $slugtag2 = $slugtag; ?> $postid = url_to_postid('https://www.sitiostotal.com/'.$slugtag.''); ?> if ($postid === 0) { $slugtag2 = $slugtag . "-total"; $postid = url_to_postid('https://www.sitiostotal.com/'.$slugtag2.''); } ?>