diff --git a/b2-include/b2template.functions.php b/b2-include/b2template.functions.php index cf39ee903..b84413ba6 100644 --- a/b2-include/b2template.functions.php +++ b/b2-include/b2template.functions.php @@ -437,7 +437,7 @@ function get_permalink($id=false) { ); return $siteurl . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); } else { - return $siteurl . '/' . $blogfilename.$querystring_start.'p'.$querystring_equal.$idpost->ID; + return $siteurl . '/' . $blogfilename.$querystring_start.'p'.$querystring_equal.$id; } } }