diff --git a/b2-include/b2template.functions.php b/b2-include/b2template.functions.php index 02aedd136..c1c538f47 100644 --- a/b2-include/b2template.functions.php +++ b/b2-include/b2template.functions.php @@ -1188,9 +1188,9 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com return; } } - echo 'post_name ); - return str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); + return $siteurl . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); } else { // if they're not using the fancy permalink option - return $file.$querystring_start.'p'.$querystring_equal.$post->ID; + return $siteurl . $file.$querystring_start.'p'.$querystring_equal.$post->ID; } } else { // if an ID is given $idpost = $wpdb->get_row("SELECT post_date, post_name FROM $tableposts WHERE ID = $id"); @@ -1437,9 +1438,9 @@ function get_permalink($id=false) { date('j', $unixtime), $idpost->post_name ); - return str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); + return $siteurl . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); } else { - return $file.$querystring_start.'p'.$querystring_equal.$idpost->ID; + return $siteurl . $file.$querystring_start.'p'.$querystring_equal.$idpost->ID; } } }