Wordpress博客URL和事件URL重复域

时间:2016-12-24 05:04:35

标签: javascript php wordpress url

出于某种原因,在wordpress上,活动和博客帖子的Urls显示如下:

Blog Post URL: http://blackbayarea.co/blog/blackbayarea.co/families-of-orlando-shooting-victims-file-federal-lawsuit-against-tech-companies/

Event URL: http://blackbayarea.co/calendar/blackbayarea.co/event/37th-mlk-jr-luncheon/?instance_id=5845

而不是:

Blog Post URL (Correct): http://blackbayarea.co/families-of-orlando-shooting-victims-file-federal-lawsuit-against-tech-companies/

Event URL (Correct): http://blackbayarea.co/event/37th-mlk-jr-luncheon/?instance_id=5845

我非常感谢你的帮助!

2 个答案:

答案 0 :(得分:2)

看起来您的WordPress HOME和SITEURL常量可能未正确设置。尝试在您网站的wp-config.php文件中添加以下内容:

define('WP_HOME', 'http://blackbayarea.co');
define('WP_SITEURL', 'http://blackbayarea.co');

答案 1 :(得分:0)

请显示该模板部分的代码..

我的猜测是你没有将协议部分包含在链接中,例如:

<a href="example.com/some_link">Some Link</a>

会创建http://example.com/example.com/some_link

您需要链接:

<a href="http://example.com/some_link">Some Link</a>