Possible to remove taxonomy from permalink if uncategorized?

I'm working on a client's website who requested that the custom search functionality I'm building out pro

I'm working on a client's website who requested that the custom search functionality I'm building out provide a number of 'pretty' permalinks that they can use for ad campaigns.

The post types I'm working with are community, floorplan, and ready-made homes, and they want to be able to have direct links to search results by county and community.

To achieve this, I set up taxonomies that would create nicely formatted URLS such as {county}/{community}, {county}/{community}/{floorplan} {county}/{community}/{ready-made}.

This is all working fine, however it leads to some issues. For example, If you do not specify a county in your search, you will get links like uncategorized/{community} returned in the results.

Is there any way that you can remove uncategorized taxonomy from the URL, but leave the taxonomy in if it exists?

I've figured out how to update the URLs in the search results, however they will lead to 404s if left completely empty because they technically don't exist if you remove the taxonomy from the url. Ideally, I would want them to just redirect to communities/{community} for example, instead of communities/uncategorized/{community}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742265790a4411759.html

相关推荐

  • Possible to remove taxonomy from permalink if uncategorized?

    I'm working on a client's website who requested that the custom search functionality I'm building out pro

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信