admin管理员组文章数量:1135117
Just switched WP themes and I have about 1300 media files attached to what Wordpress is calling a 'Private Post'.
These Private Posts are actually photo portfolios from the previous theme. 200 portfolios, with 5-7 media files attached to each.
I need to detach this media before it can be used in the new theme. Right now its a manual, tedious process :(
I am hoping there is something I can change in the DB to detach these media files in one go. Any help appreciated. Thanks in advance.
Just switched WP themes and I have about 1300 media files attached to what Wordpress is calling a 'Private Post'.
These Private Posts are actually photo portfolios from the previous theme. 200 portfolios, with 5-7 media files attached to each.
I need to detach this media before it can be used in the new theme. Right now its a manual, tedious process :(
I am hoping there is something I can change in the DB to detach these media files in one go. Any help appreciated. Thanks in advance.
Share Improve this question asked Aug 15, 2023 at 19:06 Elemental MediaElemental Media 1 11 | Show 6 more comments1 Answer
Reset to default 1You should register the post type from the old theme, all the posts are still there in the database WordPress just doesn't know to look for them.
Use the register_post_type
with the same slug/post type name, and your old portfolio posts will reappear, no need to detach and re-attach to new pages
本文标签: custom post typesDetach Wordpress Media Files In Bulk
版权声明:本文标题:custom post types - Detach Wordpress Media Files In Bulk 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736838628a1955000.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
post_parent
field, the same mechanism used for child/parent pages. The Media in the media library is actually a post of typeattachment
. Note that you shouldn't need to detach them to be able to use another theme, and you can use the same attachment in multiple places even if it's already set to be "attached" to a single post – Tom J Nowell ♦ Commented Aug 15, 2023 at 19:33