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

learn more… | top users | synonyms (1)

12
votes
6answers
6k views

Loading External Scripts in Admin but ONLY for a Specific Post Type?

So I continue to run into this issue and I just looking for the best and simplest solution to solve this problem. I have come to make use of custom post types in many different projects and have ...
21
votes
6answers
55k views

If is custom post type

I am looking for a way to test if a post is a custom post type. For example, in say the sidebar I can put code like this: if( is_single()) { //code here } I want code were I could do ...
10
votes
1answer
2k views

Custom Post Type Templates from Plugin Folder?

I'd like to offer my custom post type as a Plugin, so that people can use it without touching their theme folder. But custom post type templates -- such as single-movies.php -- reside in the theme ...
8
votes
3answers
13k views

Allow member to have access to custom post type only. Permission to only edit their own posts

OK I'm looking for the best way to attack this. I'm very comfortable with PHP and making custom post types with custom meta fields in WordPress. Here is what I'm looking at doing: User registers ...
6
votes
2answers
5k views

Attaching media to custom posts without editor

I'm creating a custom post type, "gallery", in which the admin should be able to upload images (these images would be attached to the post). The thing is that the "editor" meta box is disabled for ...
12
votes
1answer
3k views

Should I use custom post types or a custom database tables for plugin development?

I'm fairly new to writing wordpress plugins, but I've jumped in the deep end already and I want to make sure I'm doing it "right" on my upcoming big project. I'm going to be heavily extending ...
10
votes
3answers
2k views

Display all posts starting with given letter?

I'm trying to build Wordpress based dictionary, basically it will have 26 pages (one for each letter): A B C ... X Y Z And every page will display all posts starting with given letter, so after ...
5
votes
3answers
5k views

Custom Post Type - Taxonomy Dropdown Menu?

I have created a custom post type and added various meta boxes/fields to this custom post type. All is working excellent except for one element... Instead of utilizing the default interface for ...
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 ...
7
votes
4answers
2k 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 ...
8
votes
1answer
983 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 ...
6
votes
3answers
4k views

Add .html (dot HTML) extension to custom post types

Is there any way to add the .html extension to custom post types without plugin ? For posts I can use /%postname.html on the permalink settings For pages I can use: add_action('init', ...
6
votes
2answers
4k 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' => ...
5
votes
3answers
29k views

Query for custom post type?

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 ...
3
votes
2answers
591 views

Custom post types - Use post_id in permalink structure

I'm registering my CPT like so: $args = array( 'labels' => $labels, 'public' => true, 'hierarchical' => false, 'rewrite' => array( 'with_front' => false, ...
3
votes
1answer
10k views

How to rewrite URI of custom post type?

The site that I am working on uses the following "pretty" permalink structure: http://example.com/blog/my-special-post But for a custom post type my client would like to avoid having a "pretty" ...
19
votes
3answers
15k views

How to get all taxonomies of a post type?

How can i get taxonomies of a post type? If I have a post type event and i need to find out the list of taxonomies that are attached to that post type. How do I find them?
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 ...
6
votes
2answers
4k 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:
5
votes
2answers
4k views

Using add_theme_support inside a plugin

I've created a custom post type as a plugin and released it into the repository. One of the core features involves using a featured image. I've added thumbnail to $supports in register_post_type(), so ...
8
votes
1answer
3k 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/, ...
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 ...
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 ...
5
votes
1answer
3k views

custom slug for custom post type

Hi and thanks for reading. I want to insert the post author into my custom post type slug. Example: http://example.com/charts/%author%/ Any ideas how to accomplish this? Here is my custom post ...
5
votes
2answers
5k views

How to handle a hierarchy with custom post types

I have moved into WordPress for a few days and was quite impressed by all the available features, plugins and polished themes. I have spent quite some times reading documentation about themes and ...
3
votes
3answers
963 views

Setting a custom sub-path for blog without using pages?

Warning: fairly pedantic request ahead. I have a design that makes use of posts (I.e., the blog) and a custom post type called "howto". The site front page ("/") has a template that displays the ...
3
votes
2answers
844 views

Remove tabs from media uploader for a CPT

I use the media uploader in a own meta-box for a custom post type called "premium". The Thickbox opens after a click of the button in the meta-box and files can be uploaded. Now I want to remove the ...
3
votes
3answers
6k views

How to display regular posts & custom post types that fall under a category using just the generic category template?

1) My site has posts, and 2 custom post types (news & essays) 2) They all share normal categories like sports & health (no custom taxanomy involved) 3) Using the generic category.php template, ...
3
votes
4answers
3k views

Seperating Custom Post Search Results

I have a site that has a few custom post types. When a customer searches it shows a combination of all the different posts. I'd like to segment the two on the same page resulting in something that ...
3
votes
1answer
1k views

Custom Post Type “Event”: chronological list of recurring events

i'm looking for a good and easy way to have a custom post type "event" that can have multiple dates. (I have tested about 20 plugins). I think i have no problem building a metabox allowing the user to ...
2
votes
1answer
290 views

Get terms that contain posts that in turn belong to other terms?

So I have custom taxonomy called "shape" and another one called "color". If I want to get the list terms under shape that contain posts that are also present in terms under color, how do I do that? ...
1
vote
1answer
1k views

Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url

I have been reading dozens of posts and honestly, I have many doubts on how this work. Furthermore, I think that with WP3.1 more issues have been added here because I am having even more problems now ...
6
votes
8answers
7k 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.
5
votes
5answers
9k views

Display all posts in a custom post type, grouped by a custom taxonomy

I’m working on a member page where I use a custom post type with a custom taxonomy. My custom post type is called “member” and my custom taxonomy is called “member_groups”. I want to list all the ...
3
votes
2answers
2k views

Custom Post Type, WP_Query and 'orderby'

I do have a custom post type with the following setup: $supports = array( 'title' , 'editor' , 'thumbnail' , 'revisions' , 'page-attributes' ); $args = array( 'hierarchical' ...
3
votes
1answer
1k views

Custom post types - Use post_id in permalink structure when using has_archive => true

I recently asked this question Custom post types - Use post_id in permalink structure and solved it but as I have enabled 'has_archive' => true the solution given no longer works. Let me explain: ...
3
votes
4answers
5k views

Counting Posts of a Given Post Type Having a Specific Taxonomy?

(Moderator's note: The original title was "How to know the number of custom type posts having a specific taxonomy") I'm stuck with the function wp_count_posts()! I created custom post types called ...
2
votes
1answer
2k views

Custom Post Type Rewrite Rule for Author & Paging?

I'm using WordPress 3.0.1 and I have made custom post-type called 'dienasgramatas'. My plugin also makes custom rewrite rules for displaying all posts from this post type and even custom permalink ...
1
vote
2answers
4k views

Custom post type archive with pagination?

I have a custom post type called 'projects' (pastebin) and I have a page called Projects set up in my dashboard which is set to display the Projects template. (pastebin) The problem is when I use ...
10
votes
1answer
314 views

WordPress dashboard, viewing CPT results in 504

I created a custom post type with a custom taxonomy. I have about 1500 posts all of which are assigned to some sort of taxonomy term...some being assigned to 200+ terms. I noticed that from the ...
8
votes
2answers
4k views

Integrating a custom post type into a page hierarchy

I'm creating a theme with a custom post type for team members, I've also got the following page structure: about <-- this is a page about/team-members <-- this is a page, lists all the team ...
5
votes
1answer
504 views

Put update-like notification bubble on multiple CPTs menus for pending items

Much like how the Plugins or Comments menu items have these number notifications in a bubble for updates and unmoderated comments respectively, I'd like to use that bubble to display the number of ...
5
votes
2answers
2k views

Custom Post Type Menus

I'm writing a plugin for work because our main website is being ported to WordPress eventually. I've got multiple custom post types planned for this plugin and would like to group them all into one ...
4
votes
1answer
256 views

Dynamic taxonomy in permalink made all other posts NOT FOUND?

I added my taxonomies in the permalink instead of the Custom Post Type's slug, and it works fine. I'd even say everything was working fine but changing the WP installation to Multisite broke all other ...
4
votes
1answer
588 views

Rewrite rule for Custom post type Monthly and Yearly archive

I have a custom post type "contest_recipe". I can view contest recipe posts by year and by date with the following urls: http://example.com/2011/?post_type=contest_recipe - shows all 2011 contest ...
4
votes
3answers
10k views

How to Add Custom Fields to a Custom Post Type?

Ok, so I have registered a few custom post types and a few taxonomies. Now, for the life of me, I cannot figure out the code I need to add a Custom Field to my Custom Post Type. I need a drop down ...
3
votes
1answer
212 views

Remove unwanted part of permalink custom structure from CPT url?

My site currently has regular posts (in a section called "Trend Watch"), as well as a Custom Taxonomy (called "Region"). My permalink settings have this Custom Structure: ...
3
votes
1answer
846 views

How can you make permalink work for custom post type and taxonomy?

I have spent days now trying to figure this out, StackOverflow is my last resort. All I want is the following: ...
3
votes
1answer
2k views

Rewrite permalinks for custom posttype and custom taxonomy

How to rewrite permalinks for a custom posttype and custom taxonomy? I have a custom taxonomy: region, and a custom posttype: business. Now, how to rewrite the permalink, so that for a category, ...
2
votes
2answers
10k views

How to display category information from a custom post

I have created a page that uses custom posts: http://www.africanhealthleadership.org/resources/toolkit/ Each tool (Preparation, Assessment, etc.) is a custom post. On the WP Admin, each tool is a ...