Custom Post Types extend the WordPress back-end to support additional, non-Post content.

learn more… | top users | synonyms (1)

9
votes
2answers
12k views

Custom Post Type URL Rewriting?

I setup a custom post type for my portfolio projects. The main URL for this is located at /projects/ Now I've also setup my blog posts permalink to /articles/*/ for the permalink structure. This ...
9
votes
1answer
3k views

Custom bulk_action

I would like to add a custom bulk action to a custom post type. I came across the filter bulk_actions-screenid, which according to its documentation, would do exactly as I wish. However, after about ...
9
votes
5answers
4k views

Wordpress 3.3 custom post type with /%postname%/ permastruct?

There is earlier post with similar title, but it does not look in to the WordPress 3.3, and that is important as 3.3 advertises interestingly: "Use the postname permalink structure without a ...
8
votes
6answers
11k views

Get terms by taxonomy AND post_type

I have 2 custom post types 'bookmarks' and 'snippets' and a shared taxonomy 'tag'. I can generate a list of all terms in the taxonomy with get_terms(), but I can't figure out how to limit the list to ...
8
votes
1answer
6k views

Query all posts where a meta key does not exist

I am trying to get a query to retrieve all the posts where a specific meta_key does not exist and then create it. I am having problems finding those posts as the query I am testing does not seem to ...
8
votes
3answers
3k views

Custom Post Type Data in Sidebar widgets?

(note: this question was originally about Custom Fields, but @MikeSchinkel had a better solution involving Custom Post Types) On my site I have several pages which I want to show the same data in the ...
8
votes
2answers
4k views

get_terms by custom post type

I have two custom post types 'country' and 'city' and a shared taxonomy 'flag'. If I use: <?php $flags = get_terms('flag', 'orderby=name&hide_empty=0'); I get a list of all terms in the ...
8
votes
2answers
4k views

How to Remove Certain Screen Options and Meta Boxes from add/edit post type?

Now, when you add or edit a particular post within your desired post type, there are more screen options as well. Although, these Screen Options are showing/hiding meta boxes. I would like to be able ...
8
votes
1answer
580 views

Efficient Taxonomy Intersection

I have many uses for this but I want to know the most performant way of doing what is going to be an expensive operation. As an example I will use a shop. Given: A product brand taxonomy A product ...
8
votes
1answer
5k views

Redeclare/Change Slug of a Plugin's Custom Post Type

Is it possible to redeclare/change the slug of a plugin's existing custom post type (without simply editing the plugin)? That is, if Plugin X creates a custom post type with the slug /uncookedtoast/, ...
8
votes
1answer
1k views

How to disable generation of default image sizes for some custom post types?

I used custom post type, where 'thumbnail', 'medium' and 'large' sized not required. I need to disable this sizes and create function or plugin, where i can set, which image size is required for each ...
8
votes
1answer
324 views

Mixing regular and custom post types (with meta_query) on home page

Not sure how to achieve this. I'm trying to mix standard posts and custom posts on a site homepage but I only want to display the custom posts if a meta value is set. Displaying the posts works fine ...
8
votes
2answers
390 views

How to get a variable number of posts per post type on the main loop?

I'm looking for a way to balance the content at the homepage of my blog: the blog has a few post types like Poscasts, Videos and Blog and I'd like to have let's say 10 Posts on the homepage, but I'd ...
8
votes
1answer
7k views

How to add custom post type archive page links to nav menu?

I cannot figure this out. There seems to be no checkbox or anything similar in function to add the newly created custom post type archive page into the menu. Also the link must be active, if you are ...
8
votes
3answers
5k views

WordPress Rewrite Rules for Custom Post Type and Taxonomy

I have found this place to be a good source of information in the past through a lot of Googling for the problems I have run into. My question pertains to the verbose rewrite rules WordPress uses. I ...
7
votes
2answers
1k views

Multiple Custom Metabox Help

I have been trying to get this worked out for over a year and have tried numerous ways and have not been able to get it to work. I'd really appreciate it if someone could help me with this. Here's ...
7
votes
4answers
4k views

Showing User's Post Counts by Custom Post Type in the Admin's User List?

I'm trying to figure out how to hook into the /wp-admin/users.php manage page to create custom columns for showing the number of posts users have for the custom post types on WPHonors.com. I created ...
7
votes
2answers
6k views

Load a script just to custom post type in admin

I have created a custom post type "portfolio" with something like this : $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => ...
7
votes
1answer
4k views

Custom Post Types and template_redirect

I have two custom post types (e.g. post_type_1 and post_type_2) that I would like to redirect to independent templates (single-post_type_1.php and single-post_type_2.php) to handle their display. I ...
7
votes
1answer
1k views

Remove the “View” Link in Post Admin

I have a custom post type that I'm just using just to keep data in but I sometimes share it with others, and I don't want any confusion when the "view" link appears in the admin column. Is there a ...
7
votes
2answers
2k views

Handling front-end file uploads, considering safety and ease of use

I'm looking to adapt an existing forum-like plugin which has no facility for attaching media. The plugin works as a Custom Post Type, so it would be as "simple" as attaching an image to a post. I am ...
7
votes
4answers
3k views

Extending the search context in the admin list post screen

I have a created a custom post type and have attached some custom fields to it. Now I would like for the search that authors can perform on the custom post list screen (in the admin backend) to also ...
7
votes
6answers
3k views

Placing a custom post type menu above the Posts menu using menu_position?

I just figured out the menu_position parameter it seems like you can place the menu of your custom post type almost everywhere. Except above the Posts menu! How can I accomplish that?
7
votes
2answers
1k views

Creating a relationship between two post types

I want to build a TV series database using WordPress. I have followed some tutorials and I have two custom post types: one for movies, one for and series. I followed this post for the structure. My ...
7
votes
2answers
3k views

Creating a Custom Post Type as a Plugin? Why?

I've been experimenting with creating a Custom Post Type as a plugin (because I've seen this recommended in various places). But I have a question not about the how, but rather the why of building ...
7
votes
2answers
2k views

Can multiple custom post types share a custom taxonomy?

I'm considering rebuilding a drupal site in wordpress and am still wrapping my head around the differences between the systems - particularly cck/fields and custom content types and the different ways ...
7
votes
2answers
2k views

Use template_include with custom post types

I want to check for an appropriate template in the theme folder before falling back to the file in my plugin directory. Here’s my code: add_filter('template_include', 'sermon_template_include'); ...
7
votes
1answer
4k views

Row actions for custom post types?

I'm working on a plugin, which converts a site into a feedback sort of portal. I made a new object page, 'Feedbacks', which displays all the feedbacks is a tabular format, and I'm using ...
7
votes
1answer
3k views

Shouldn't this be easy?! Custom post type/custom taxonomy permalink

So this is driving me absolutely insane. I've spend days trying to fix this and I can't work out why this is so difficult as surely this is a very common permalink structure! I looked through ...
7
votes
3answers
5k views

How can I bulk upload images and automatically create posts for each one at the same time?

I know how to upload multiple images into an existing post, but this is a different scenario. This is for a large catalog of assets, with each custom post-type post representing an image asset (thus a ...
7
votes
1answer
421 views

Any way to make posts inherit properties/taxonomies through a single assigned taxonomy

I want to have a central "data" sheet that is regularly drawn upon for types of posts that are submitted. Lets say I had a movie review site, but also want to let people post other info, like Trivia ...
7
votes
2answers
442 views

Permalink Structure for Multiple Post Type Archives by Taxonomy

Recently I have been working on an advanced WordPress project, and I'm stuck with changing permalink structure for custom post types. I have created 3 post types lets say: type1, type2, type3 and a ...
6
votes
17answers
404 views

The Great Plugin Nomenclature Contest of 2011

It's been a while since I've done a bounty challenge, so here's another. Same basic rules: 1 answer per person, most creative/useful/helpful/entertaining answer wins. This time around, the award will ...
6
votes
8answers
8k views

How to rename default posts-type Posts

I'm using the posts-type Posts to display portfolio items and it looks strange to have portfolio labeled as posts. Is there any way to rename Posts to Portfolio instead to better reflect it's usage.
6
votes
5answers
4k views

Change “Enter Title Here” help text on a custom post type

I have a custom post type created for a directory that will end up being sorted alphabetically. I will be sorting the posts in alphabetical order by title, so I want to make sure that the Title is ...
6
votes
3answers
3k views

Add Custom Fields to Custom Post Type RSS

I'd like to add custom fields in my custom post type to the RSS feed for that post type located at http://example.com/feed/?post_type=my_custom_post_type I've seen info on doing this for the regular ...
6
votes
3answers
5k views

Add extra parameters after permalink?

How can I add extra parameters after a permalink, specifically if I'm using a custom post type? For example, let's say http://mysite/album/record-name was the permalink. How can I make ...
6
votes
4answers
306 views

Are custom post types lost when the theme is changed?

I am about to begin work on a custom WordPress theme and I want to know how careful I have to be about custom posts. Suppose I create a WordPress theme that registers several custom post types. To ...
6
votes
3answers
36k views

Query for custom post type? [closed]

I have installed the Custom Post Type UI plugin. After activation of this plugin I have created a custom post type called portfolio. Now I want to use this on the portfolio page in the front-end. How ...
6
votes
3answers
2k views

How can I convert Posts into Custom type posts?

I have a Wordpress site that I just updated to 3.1. I want to make use of custom post types now, my question is how can I assign (transfer?) a post to a newly created custom post type ? For example, ...
6
votes
3answers
18k views

Submit post and upload image from front-end

I am trying to do something similar to the above question. I am trying to make users post and upload images from front-end. I have already done the post form and its working. I just followed and ...
6
votes
4answers
2k views

Adding Custom Post Type Counts to the Dashboard

The dashboard conveniently tells me how many posts, pages, and comments I have. I would like it to tell me how many articles, videos and cartoons I have too (three custom post types registered with my ...
6
votes
2answers
8k views

Hide content box with Custom Post Type?

Ive created a custom post type and I want to hide the main textarea content in the publish/edit page. Is it possible ? Thanks!
6
votes
2answers
5k views

How to change default position of WP meta boxes?

Im wondering if there is a way to change the default position of Wordpresses meta boxes such as "featured image" for custom post types without having to drag them manually? Example:
6
votes
2answers
8k views

Possible to hide Custom Post Type UI/Menu from specific User Roles?

What I'm looking to do is completely hide the UI for a custom post type from specific user roles...Ive previously found many resources on how to disable access to using those CPTs but nothing that ...
6
votes
3answers
2k views

Possible to turn off autosave for single custom post type

So I'm having an issue with my custom fields in my custom post type. For whatever reason the fields save and then clear somewhat randomly... I'm sure it's not random but I'm not sure what's triggering ...
6
votes
5answers
8k views

Custom Post Type Archives by Year & Month?

How do you display the archives of a Custom Post Type by Year & Month?
6
votes
5answers
3k views

Marking future dated post as published

Use case: I have a post type that relates to a music show. The 'show time' is grabbed through the post publish date which is set to some time in the future. I've found a function that takes future ...
6
votes
1answer
4k views

Custom post type, no need for single view, plus want permalink rewrites that include hash in URI

We are using CPT's to manage a frequently asked questions page on a site, where the question is the post title and the answer is the post content. There is a main page for the FAQs that shows all ...
6
votes
3answers
2k views

Nested custom post types with permalinks

I am trying to set up a multi-level custom post type structure with permalinks that look like authors/books/chapters, with authors, books, and chapters all set up as their own custom post type. For ...