最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Child-Theme Category View with modified permalinks (%category% removed)

programmeradmin1浏览0评论

I created a new WP Website and added a child-theme to it. The child-theme contains header.php, footer.php and I also created a category.php, in which I show different headers for each category.

I figured out, that the urls to the projets are now

/

Now I want to remove the category from the url and i am using the 'standard' trick for category removal in wordpress. In my permalinks i set the actual permalinks structure to

/%category%/%postname%/

and the category base to

.

The urls are now fine but my category.php from the child-theme is not used any more and I also have no articles in the categories. When i change back the permalinks to the default everything works fine.

It also does not work to do it like category-4.php for the category with the id 4.

Maybe anybody can give advice what to do or what the correct way is to handle that.

发布评论

评论列表(0)

  1. 暂无评论