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

learn more… | top users | synonyms (1)

4
votes
2answers
746 views

Why does my custom WP role need edit_posts to edit images?

This may be obvious to someone other than myself. I think I remember reading somewhere that an "image" is indeed a form of "post". I have a custom post type called "listing" I have a custom WP role ...
4
votes
2answers
5k views

Custom Post Type Archive Page: Set Posts Per Page, Paginate

I have a custom post type called video. Would like to paginate its archive page, showing only 3 posts on each page. There is also a custom loop on the archive page that outputs all the video posts ...
4
votes
3answers
916 views

Custom Post Types 404 Issue

I dont know why my custom post types render the Page not found. This is the code I am using to register custom posts. www.example.com/products/product1/ renders 404 where as ...
4
votes
1answer
1k views

How to order adjacent posts (prev / next) by custom field value?

I am using the More Fields and More Types plugins to create a custom post type called product. This custom type is based on the Post type. One of the fields is named lot which is an integer ...
4
votes
1answer
1k views

Filter custom post types in admin not working

Hello I'm wondering if anyone can help me figure this out. Essentially when I click on my custom post type 'Portfolio' in admin, I see a list of 'Services' next to posts, but when I click on one to ...
4
votes
2answers
467 views

Returning search results by relevance, including Custom Post Types

The default WordPress search setup isn't really working for my website's setup. I have two custom post types (species, glossary) which I'd like to search for, as well as the standard post type. The ...
4
votes
1answer
487 views

Two Custom Post Types, Share Two Taxonomies

I have two custom post types Hotels Things to do And I have two taxonomies Activities Regions So when a user sees a Hotel (custom post): the user can then see the region it's in what ...
4
votes
1answer
2k views

Custom sortable columns ordered by meta-value?

I have no idea why my sortable function does not sort my "events" my a custom post-meta. I have a custom-post-type named wr_event… I have my custom columns set up and my post-meta is shown in the ...
4
votes
5answers
2k views

Remove slug in taxonomy url

Just wondering, how can remove slugs from some URLS. I'm using a custom post type called exhibitors, and some taxonomies to define those exhibitors (eg: featured-guests, publishers etc.): Right now ...
4
votes
2answers
3k views

Adding post tags to custom post types

Standard WordPress post types have "Post Tags" which can be used to "tag" posts with similar content, makes those similar posts easily accessible just by opening that particular tag page and receiving ...
4
votes
2answers
1k views

Page as child in custom post type slug?

I have the following structure: /projects (archive of cpt projects with template archive-projects.php) /projects/project-1 (single view of cpt with template single-projects.php) /projects/downloads ...
4
votes
1answer
4k views

How to filter custom posts by tags and custom fields?

I'm planning a site for a client who wants users to be able to filter upcoming events by the following criteria: Type i.e. Comedy, Theatre, Music etc. Date Daily or Weekend Duration Daily or Half ...
4
votes
1answer
1k views

Create page to handle form submission

I currently have some custom post types "shops" (actually more like pages than posts) and a custom taxonomy "products" linked to those post types. I'm attempting to create a form (via shortcode) that ...
4
votes
2answers
240 views

Show the First Post from Each of 3 Different Post Types on a Web Page?

I have 3 different custom post types: 1.) "events", 2.) "winners" and 3.) "offers". How would I go about retrieving the first (latest) post in each of these post types on a single web page (i.e a home ...
4
votes
5answers
2k views

How to replicate some of Drupal Views functionality in WordPress?

I admit, I still think in Drupal. (In choosing between developing in WordPress and Drupal, I still tend to favor Drupal, because I haven't yet figured out a few things on the WordPress side.) Can ...
4
votes
1answer
573 views

Creating a Custom Post Type for Inserting Preset Content into Post & Pages?

In response to Mike Schinkel's comment (see below) on my post about how to pre-populate content (essentially using a content template)... @Scott B I mean why did you support a file on disk ...
4
votes
2answers
550 views

Implementing “Video of the Day” Feature?

I'd like to add a new area on a WordPress 3.0 site that contains a new video from YouTube each day. This video would be manually picked, and manually added each day. I'm not sure how to properly set ...
4
votes
1answer
79 views

Restrict a Post Types Post Status

I have a custom post type and a completely custom user interface to access it, and would like these posts to have a publish status. I know how to make them skip trash and be deleted immediately, but ...
4
votes
1answer
93 views

How make get_next_post() return first post when viewing last one

I need a way to link to the first and the last post (CPT) created. For example, I'm in the last post and if I click in "next" I should go to the first. Now i have this <?php $next_post = ...
4
votes
2answers
2k views

How do i display the post type title?

Hi i was wondering if there is a way that i can display the custom post type title. For example: I have a custom post type entitled "Pretty Little Liars" and it also shows on the homepage, but how ...
4
votes
1answer
352 views

Custom post type capabilities

I've got a somewhat unique scenario that I would appreciate some assistance with. I have a custom post type, coin, for content that is automatically created by an custom import process. I would like ...
4
votes
1answer
301 views

When we register a custom taxonomy or post type, does the WP database modified at all?

When you use the register post type and register taxonomy functions in your functions.php, where do all that setting info get stored in regards to the CT's and CPT's you are registering? I'm talking ...
4
votes
1answer
568 views

Why does my custom taxonomy show a total count across all post types

I have created a custom taxonomy 'season' I have 3 custom post types which I want to use this taxonomy. These are Races Galleries Competitors Now, when I view the totals within the taxonomy ...
4
votes
1answer
3k views

How to assign specific users the capability to edit specific pages / posts / custom post types

I'm trying to implement what seemed like a relatively straight forward idea, basically I am building an access control plugin to control viewing and editing of a custom post type (in this case ...
4
votes
1answer
151 views

Category as Class for Custom Post Type

I've only just realised that custom post types don't appear to output the category as a class in the loop, via post_class and I wonder if anyone can suggest a work around. Is this something that ...
4
votes
3answers
484 views

Query custom post type by custom field

General Info I used the plugin WP Types (wp-types.com) to create a custom post type called "artist". In WP Types you can also set another post type as parent post type. This is not possible by ...
4
votes
1answer
159 views

Numbering sections and block-level elements in wpautop(); Wordpress as CMS for long-form writing;

I am starting to learn how to write plugins for Wordpress. I'm interested in using WP as a CMS for long essays (6000-9000 words or more). My problem is what I call the Kindle problem, which is how do ...
4
votes
1answer
247 views

Wordpress - Creating multiple versions of the same single-customtype.php depending on selected taxonomy categories

I have registered a custom post type 'Clients' and a taxonomy for this post type for categorizing posts. There are currently 3 categories for a Client: 'Logo Project', 'Video Project' and 'Web ...
4
votes
2answers
395 views

Highlighting current item of custom post types' sub pages, listed by wp_list_pages

The below code is for listing the custom post types itself and its children in the sidebar. The code works great but does not highlight the sub pages. In functions.php: ...
4
votes
1answer
201 views

Hide custom post type field from author?

For a business association website, I've built a membership database using a custom post type. Businesses sign up with an online form, which creates a custom post for that business, and when the ...
4
votes
1answer
110 views

Duplicating custom post type and its posts

I have a custom post type with over 100 posts. I want to create another custom post type and have the same posts with the same post titles. Is there a simple DB query that will allow me to do this, or ...
4
votes
1answer
3k views

Creating Photo Gallery System with Custom Post Type

I'm creating a movie blog using WordPress. I have Movie and Trailer custom post types and I want to add a Photo feature for this and I want to add a relationship between this photos and Movie CPT. ...
4
votes
2answers
534 views

Display Editable Text Above CPT Archive Listings

I have two custom post types (Authors and Partners). I display their archive page's in the main navigation and use archive-authors.php and archive-partners.php to make a couple small tweaks to the ...
4
votes
4answers
2k views

How to properly turn off REVISIONS and AUTOSAVE for whole site and optionally for a custom post type only

Is there a hook/function combination that can be added to my theme's functions.php to properly disable REVISIONS and AUTOSAVE for the entire wordpress installation? What about if just for a certain ...
4
votes
1answer
626 views

WordPress search: pretty URLs (permalinks), custom post types and pagination

I have three separate search boxes on my website: species CPT search, glossary CPT search and a general search which I'd like to search post and species post types. My questions are threefold, ...
4
votes
3answers
271 views

Does anyone have any frameworks to setup custom post types and related actions/filters?

So I know that setting up custom post types ranges from just registering them to adding custom permalinks, custom sorting, customizing columns in the admin, etc. I was wondering if anyone had a ...
4
votes
1answer
583 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
1k views

Using /%postname% for a custom post type

I have a custom post type whose permalink needs to sit in the same space as pages, like so: /an-example-thing <-- custom post type 'thing' /about-the-things <-- a normal page I'm well ...
4
votes
1answer
200 views

How do you get the count of posts in an archive page?

I have a custom posts archive page of the type archive-my_custom_post_type.php and I am using the "standard" loop which consists of the ever-so famous <?php if(have_posts()) : ?> <?php ...
4
votes
1answer
485 views

Custom post type support for get_users('orderby=post_count');

The default WordPress function get_users('orderby=post_count'); only orders users with the count of the posts they've made. Any idea how to modify this to support custom post types as well? UPDATE: ...
4
votes
1answer
180 views

Permalinks so that one custom post type appears to be a child of another, not working

Currently I have two post types, "products" and "products-data" they are separate post types; however, for all intents and purposes products-data is a child post of products. The relation is ...
4
votes
1answer
254 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
663 views

How to change “Draft” string for status of custom post type to “Unavailable”?

ANSWER MOD: just an important mod to the chosen answer: // check if you actually have drafts; also avoids extra '|' separator if (isset($views['draft'])) { // 'Drafts' should be added (and come ...
4
votes
1answer
68 views

Uploading DB to server from local is not matching the post dates

I just created a custom WP CMS and am having trouble with the custom post maintaining the correct order on the front-end. In the back end the date order is correct but is not being reflected on the ...
4
votes
1answer
110 views

Multiple Paginations on one Page

I have a page template which aggregates multiple CPT's in different areas of the page and displays the first post from each CPT. I'd like to add a separate pagination for each of them. Is it possible ...
4
votes
1answer
918 views

How to filter custom post type archive by meta value

I have a problem where I'm trying to build a calendar plugin for a client. I'm having trouble getting a date based archive for the custom post type I'm using. I'm not too well versed in how the ...
4
votes
3answers
2k views

Different post format options per custom post type?

I want to add post formats for each post type. For example, I have a post type 'Gallery'. I want to add 'images', 'galleries' and 'videos' in this post. In normal posts I want to use another list of ...
4
votes
1answer
570 views

Display content from custom meta boxes in revisions

When I see a "revision" for a given post type, I only see the title, the content and the excerpt. How can I see the content of a custom meta box (or any other field, for that matter)?
4
votes
1answer
143 views

Making %author% the rewrite slug for custom post type causes 404s on non CPTs

This has been driving me absolutely mad. I created a custom post type which I plan to use to create pretty affiliate/redirect links throughout my site. Here is my register_post_type(): ...
4
votes
1answer
246 views

Why would Wordpress use 'attachment' in a custom post type's query string?

Why would Wordpress use 'attachment' in a custom post type's query string? Albeit I have a slightly contorted structure in place, I can't seem to find where 'attachment' comes into play and how to ...