Home › Forums › WordPress Themes – Premium › Encounters › Possible to freely define a “custom post type” ?
- This topic has 4 replies, 6 voices, and was last updated 9 years, 10 months ago by
Sushil Adhikari.
-
AuthorPosts
-
February 7, 2014 at 12:29 am #14674
Marcus Zurhorst
MemberHello!
I would like to create my own “custom post type”. It shall be similar to the ‘aside’ style.
Now I copied the content-aside.php to the child theme and renamed it into: content-tngupdate.phpAfterwards, I wanted to register the tngupdate post style in the functions.php of the child theme:
add_action( 'after_setup_theme', 'encounters_child_post_formats', 11 ); function encounters_child_post_formats() { add_theme_support( 'post-formats', array( 'aside', 'image', 'status', 'quote', 'tngupdate' ) ); }
This is not working. When I am now reading further, I am wondering whether or not this is possible at all.
According to http://codex.wordpress.org/Post_Formats , it seems that there is indeed a fixed list of post formats available.
But this is still static in my opinion, and not “custom”.Am I expecting too much behind the “custom post type” phrase? — Or can I introduce my very own “tngupdate” style somehow?
— If not, the only “workaround” that would come to my mind might be switching to content-video.php, which is defined, but won’t be used in my Encounters child theme.Thanks for any hints!
Kind regards,
MarcusFebruary 7, 2014 at 12:39 am #19155Sushil Adhikari
ModeratorAre you looking to create a “custom Post Type” or a custom post format? Both are very different where the post formats are predefined and not possible to create one, but a custom post type can be created. I was just testing a plugin that looks and works well if you want to create a custom post type:
http://wordpress.org/plugins/custom-post-type-ui/
I plan on using that for developing a portfolio plugin for my themes.
February 7, 2014 at 12:44 am #19156Marcus Zurhorst
MemberWell, when creating an atricle, I can choose between regular posts, short notices, cites, image for the template to be used.
Now I like to duplicate “aside” to have different heading and different CSS.Is this now a post type or a post format? (Now that you ask, I assume that this is maybe a post format…)
I will check the plugin.February 7, 2014 at 12:53 am #19158Marcus Zurhorst
MemberNew formats cannot be introduced by themes or even plugins. The standardization of this list provides both compatibility between numerous themes and an avenue for external blogging tools to access this feature in a consistent fashion.
source: http://codex.wordpress.org/Post_Formats
If I understand this correct, it is intended that I cannot freely define my individual post format.
What a pity…February 7, 2014 at 1:14 am #14675Sushil Adhikari
ModeratorCorrect… I wish we could actually because there’s many that I would love to create. But WordPress has no intentions of allowing the ability to create custom post formats…or at least not at this time. Custom Post Types can be created though.
-
AuthorPosts
- You must be logged in to reply to this topic.