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

create a subcatagory for a custom post type and out put url as posttypesubcategoryitem

programmeradmin3浏览0评论

I have created a custom post type called 'game' using the CPTUI plugin, the plugin dev has been very helpful in helping solve some issues but what I am trying to achieve is beyond the scope of what the plugin can do I think so I am asking here for some assistance.

With the 'game' custom post type I can add video games as posts and them view them at the url of mysite/games/cyberpunk-2077 for example.

I have also created a custom taxonmy in the CPTUI plugin called platform, when I got platform in the admin submenu I can create categories or taxonomies (add new platform) such as PS4, PS5, etc, the url displays like this: mysite/platforms/ps4 and it will display the list of games under that platform.

I have templates set up archive-game.php, content-game.php and single-game.php

I would like to be able to have the URL that displays like this mysite/games/ps4/cyberpunk-2077 for a game in the PS4 platform for example. Would this mainly be a URL re-writing problem, I am guessing it is indeed beyond the scope of custom post types and taxomies, how would I go about creating this URL structure and is their any polugin that can help?

Thak you for your help.

发布评论

评论列表(0)

  1. 暂无评论