After long search with no luck, finally I have decided to ask here.
I am creating WordPress theme and need to add multiple custom post type for some additional featured which I will use rapidly or can say that will be my main use for the site.
Adding single custom post type there is not problem but I want to add more than two, three or more in future. I have tried to use same code by changing register post type name but its not working and giving some error.
I would appreciate if anyone can help me to create multiple post type with multiple taxonomy and post tag for each CPT.
I will really thankful and appreciate your effort.
Try this http://wordpress.org/extend/plugins/custom-post-type-ui/
try this plugin which is very easy to use
custom post type maker
Related
the WordPress framework allows to build different archive templates for each of your custom post type by e.g:
archive-event.php
taxonomy-event_category.php
is it possible to create author and date archive for custom post type by doing the following:
author-event.php
date-event.php
if this is not possible, can anyone advise how i can go about achieving this?
I think these links will help answer your question and get you started:
http://codex.wordpress.org/Template_Hierarchy
http://codex.wordpress.org/Category_Templates
The gist of it is that you can in fact make an author-event.php however date-event.php does not get checked because the template hierarchy dictates that it uses date.php, archive.php, or index.php.
One solution is to use conditional tags such as is_author() or is_date(). If you do, keep in mind that you'll have to have a common archive.php and decide which template you really want to use by using conditional tags.
I'm trying to find information on creating my own custom rss feed for my custom post types in Wordpress.
The way I have set up my custom post types mean that the 'title' can be duplicated (although I fixed this for tags before anyone mentions it!).
Anyway, what I'm looking for is to display my title and custom meta for each of the feed's items but I just can't find any info.
Can anyone give me any ideas?
Cheers
I actually found the answer quite easily...
Create a new template (i.e. feeds/my-new-feed.php)
Copy the code from wp-includes/feed-rss2.php into this new template
Do whatever it is you need to do to display whatever you want to.
Create a new page which uses that template
Hope this helps someone else.
having researched wp forums and only found people asking this question without any answers, I resort to the source of all truth (stack overflow).
I use wordpress custom post types (Custom Post Type UI plugin) and find it very handy.
Now, I want to be able to email-publish some content via WPs built-in email publishing system, but by default that is set up to only publish as regular posts.
I am aware that I can choose categories for the emailed content, but I would very much like to keep all the pages and content of my news (=blogposts) feeds the way they are, being able to put the email-published content into a content type of its own would really help me out.
So I wonder if anyone has done that, and how you would go about it. Thanks for any input.
Not sure if this helps people looking for a solution, but I managed to do it like this...
When a post is submitted for publish by WordPress default email2post, there is an action hook named 'publish_phone' running, so you can get the post there and change its type like this:
add_action('publish_phone','custom_type_by_mail');
function custom_type_by_mail($post_id){
$p = get_post($post_id,'ARRAY_A');
$p['post_type'] = "my-custom-type";
wp_update_post($p);
}
I resorted to converting it into a post category instead of its own content type. I know not whether there be any other solution =)
I'm struggling with a problem I'm not able too solve.
I've spent a lot of hourse in codex documentation without any luck.
I've created a custom post type called "Products". Products will be available in many language. Products permalink is something like: mysite.com/products/product-name What I need instead is something like this: mysite.com/language/products/product-name.
What I need to create the permalink? Have I to add some fancy rule with WP_Rewrite?
Is it possibile to have custom post type as page child's?
I don't really need custom taxonomy so if you know a better solution fell free to write.
Thanks for any suggestion.
You need a plugin for wordpress to gracefully handle multiple languages.
I suggest you check out wpml.org
For how the Wordpress Multilingual plugin works with custom posts types, check out their informative blog post.
I am researching how to work with WordPress 3.x custom post types. I see how easy it is to create content types such as "case", "ticket", "image", etc, etc. But it seems like I am putting all my eggs in one basket. Lets say I create a new custom post type "image" so I can create galleries. Is there a way to setup multiple galleries with those images? Is there any way to setup sub-classes of the post type "images" so I can distinguish one group image from another and create multiple galleries?
I thank you in advance for your input.
ryy...custom post types are very flexible. You can distinguish posts by using custom taxonomies (http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/). Wherever you are within the WP context, you can always retrieve your custom posts using the WP_Query class (http://codex.wordpress.org/Function_Reference/WP_Query), which is extremely flexible and easy to use. You are doing the right thing by creating a custom post type for the things you've mentioned. You can keep everything well organized that way and will be able to do a lot with the data that you put into it.