get_category_rss_link slash problem
-
Hello.
When I installed WP in catalog then function get_category_rss_link return mi a not good URL. Why? If Your install path is test.com/path then URL to Your RSS for category no.1 will be http://test.com/path?feed=rss2&cat=1. So, there is no slash between path and ?. To fix this just modify file in /wp-includes/feed.php.
Replace:
if ( ” == $permalink_structure ) {
$link = get_option(‘home’) . ‘?feed=rss2&cat=’ . $cat_ID;By:
if ( ” == $permalink_structure ) {
$link = get_option(‘home’);
if($link[strlen($link)-1] != “/”) {
$link .= “/”;
}
$link .= ‘?feed=rss2&cat=’ . $cat_ID;That’s all.
The topic ‘get_category_rss_link slash problem’ is closed to new replies.