开发者

Wordpress Author URLs redirected to Home Page

开发者 https://www.devze.com 2023-03-31 03:59 出处:网络
I have tried to set up an author page in wordpress. But all the author pages are redirected to the home page. I google it and they suggested to disable plugins and then check the author pages. I tried

I have tried to set up an author page in wordpress. But all the author pages are redirected to the home page. I google it and they suggested to disable plugins and then check the author pages. I tried it and found t开发者_开发百科hat Yoast wordpress SEO plugin causes this problem. But i really want to use this plugin for SEO. Please help how to handle this. Thanks


Go into SEO/Titles & Metas then click 'Other' in the top tabs.

Untick 'Disable the author archives' and your problem will be solved.


If Yoast's plugin seems to be causing the problem — don't bother touching the code.

Instead, just install any of the other SEO plugins. They're just as good.


To resolve it Do This in admin section. plugin Version 7.0.1

SEO -> Search Appearance -> Archives -> Author archives settings -> Author archives -> marked it as Enabled.


I found out how Yoast SEO plugin determines whether to set the redirect or not. The redirect is set if you have answered in the configuration manager of Yoast SEO that the site does not have multiple authors (SEO-> Dashboard-> General -> Configuration wizard). The reason for that is to avoid duplicated from SEO perspective content, because your author and your blog page will have the same content, if the site has only one author.


You need to edit the class frontend in folder frontend and delete this line

( isset( $options['disable-author'] ) && $options['disable-author'] && $wp_query->is_author ) ||

Then the author pages will not redirect.

0

精彩评论

暂无评论...
验证码 换一张
取 消