{"id":130497,"date":"2026-09-22T08:51:18","date_gmt":"2026-09-22T08:51:18","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/post-type-generator\/"},"modified":"2026-09-22T14:19:26","modified_gmt":"2026-09-22T14:19:26","slug":"post-type-generator","status":"publish","type":"plugin","link":"https:\/\/fon.wordpress.org\/plugins\/post-type-generator\/","author":14552541,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.2","requires":"6.0","requires_php":"8.0","requires_plugins":null,"header_name":"Post Type Generator","header_author":"Ahmadreza Ebrahimi","header_description":"Create Custom Post Type With Advanced Options.","assets_banners_color":"475f6a","last_updated":"2026-09-22 14:19:26","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/ahmadreza-log\/post-type-generator","header_author_uri":"https:\/\/ahmadreza.me","rating":0,"author_block_rating":0,"active_installs":0,"downloads":221,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"AHMAD_R3ZA","date":"2026-09-22 14:19:26","revision":3707546}},"upgrade_notice":{"1.0.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3707546,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3707546,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3707546,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3707546,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":3707547,"resolution":"1","location":"assets","locale":"","width":824,"height":906}},"screenshots":{"1":"The Tools screen lists saved post types and opens add or edit in a dialog."}},"plugin_section":[],"plugin_tags":[529,1487,2275,1859,3972],"plugin_category":[59],"plugin_contributors":[183902],"plugin_business_model":[],"class_list":["post-130497","plugin","type-plugin","status-publish","hentry","plugin_tags-content","plugin_tags-custom-post-types","plugin_tags-developer","plugin_tags-export","plugin_tags-tools","plugin_category-utilities-and-tools","plugin_contributors-ahmad_r3za","plugin_committers-ahmad_r3za"],"banners":{"banner":"https:\/\/ps.w.org\/post-type-generator\/assets\/banner-772x250.png?rev=3707546","banner_2x":"https:\/\/ps.w.org\/post-type-generator\/assets\/banner-1544x500.png?rev=3707546","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/post-type-generator\/assets\/icon-128x128.png?rev=3707546","icon_2x":"https:\/\/ps.w.org\/post-type-generator\/assets\/icon-256x256.png?rev=3707546","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/post-type-generator\/assets\/screenshot-1.jpg?rev=3707547","caption":"The Tools screen lists saved post types and opens add or edit in a dialog."}],"raw_content":"<!--section=description-->\n<p>Post Type Generator adds one screen under Tools. Add and edit open in a dialog on that screen. From there you can create a custom post type, change its labels and supports, turn it off without losing the settings, or export the <code>register_post_type()<\/code> call as PHP.<\/p>\n\n<p>Definitions are stored in the <code>ptg_post_types<\/code> option on your site and registered on <code>init<\/code> while this plugin is active. The plugin does not contact any external server, does not load scripts or styles from a CDN, and does not add links or credits to the public site.<\/p>\n\n<p>JavaScript and CSS in this plugin are the source. There is no build step and nothing is obfuscated.<\/p>\n\n<p>Deleting a generated type does not delete its posts. They stay in the database and disappear from the admin until the same key is registered again.<\/p>\n\n<h4>What you can set<\/h4>\n\n<ul>\n<li>Singular and plural labels<\/li>\n<li>Post type key (lowercase letters, numbers, underscores, at most 20 characters, fixed after creation)<\/li>\n<li>Public visibility, admin screens, the REST API, an archive, hierarchy, and search<\/li>\n<li>Rewrite slug<\/li>\n<li>Editor features and taxonomies that are already registered<\/li>\n<li>A Dashicon and an optional admin menu position<\/li>\n<\/ul>\n\n<h4>Developers<\/h4>\n\n<pre><code>add_filter('posttypegenerator_post_type_args', function (array $args, array $type): array {\n    return $args;\n}, 10, 2);\n<\/code><\/pre>\n\n<p>The filter receives the arguments passed to <code>register_post_type()<\/code> and the saved definition.<\/p>\n\n<p>Development source: https:\/\/github.com\/ahmadreza-log\/post-type-generator<\/p>\n\n<h3>Privacy<\/h3>\n\n<p>This plugin does not track visitors or account holders, does not set its own cookies, and does not contact third-party services.<\/p>\n\n<p>It stores the post type settings you submit (names, key, visibility, supports, taxonomies, icon, and menu position) in the WordPress options table. Those settings are removed when the plugin is deleted from the Plugins screen. Posts created with a generated type are not deleted.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>post-type-generator<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install the zip from the Plugins screen.<\/li>\n<li>Activate <strong>Post Type Generator<\/strong> through the Plugins screen.<\/li>\n<li>Open <strong>Tools \u2192 Post Type Generator<\/strong>.<\/li>\n<li>Click <strong>Add Post Type<\/strong>, fill in the names and key in the dialog, and save.<\/li>\n<li>If an archive link returns a 404, open Settings \u2192 Permalinks and click Save Changes. The plugin also rebuilds permalinks on the request after each save.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20track%20users%20or%20phone%20home%3F\"><h3>Does this plugin track users or phone home?<\/h3><\/dt>\n<dd><p>No. It does not send data to any server. It does not embed advertisements. The only data it writes is the post type definition in your options table, plus a one-request flag used to refresh permalinks.<\/p><\/dd>\n<dt id=\"does%20it%20add%20a%20credit%20or%20link%20on%20the%20public%20site%3F\"><h3>Does it add a credit or link on the public site?<\/h3><\/dt>\n<dd><p>No. Nothing is printed on the front of the site except the post type archive and singular URLs WordPress already generates for a public type.<\/p><\/dd>\n<dt id=\"does%20this%20replace%20a%20post%20type%20my%20theme%20already%20registered%3F\"><h3>Does this replace a post type my theme already registered?<\/h3><\/dt>\n<dd><p>No. Reserved keys and keys that already exist are rejected. Registration runs after the default <code>init<\/code> priority, so an existing type keeps its own callback.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20posts%20when%20i%20delete%20a%20type%3F\"><h3>What happens to posts when I delete a type?<\/h3><\/dt>\n<dd><p>They stay in the database. They are hidden until that same key is registered again.<\/p><\/dd>\n<dt id=\"can%20i%20change%20the%20key%20later%3F\"><h3>Can I change the key later?<\/h3><\/dt>\n<dd><p>No. Create another type if you need a different key. Existing posts keep the old key.<\/p><\/dd>\n<dt id=\"do%20i%20need%20the%20exported%20php%20while%20this%20plugin%20is%20active%3F\"><h3>Do I need the exported PHP while this plugin is active?<\/h3><\/dt>\n<dd><p>No. Use the export only when you are ready to deactivate this plugin and keep the registration in other code. WordPress ignores a second registration of the same key.<\/p><\/dd>\n<dt id=\"where%20are%20the%20admin%20screens%3F\"><h3>Where are the admin screens?<\/h3><\/dt>\n<dd><p>Under Tools, on one screen. Add and edit open in a dialog on that screen. There is no top-level menu and no dashboard widget.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Create, edit, disable, delete, and export custom post types from Tools.<\/li>\n<li>Persian translation included.<\/li>\n<li>No remote assets, tracking, or public credit links.<\/li>\n<\/ul>","raw_excerpt":"Create custom post types from the WordPress admin and export their registration code.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/130497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=130497"}],"author":[{"embeddable":true,"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ahmad_r3za"}],"wp:attachment":[{"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=130497"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=130497"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=130497"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=130497"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=130497"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/fon.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=130497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}