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

learn more… | top users | synonyms (1)

4
votes
2answers
239 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
562 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
536 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
335 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
252 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
492 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
4answers
1k 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
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
91 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
311 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
148 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
233 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
351 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
182 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
92 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
443 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
1answer
578 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
243 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
502 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
1answer
459 views

custom post type and custom taxonomy permalink

I have 2 pages. /client-a/ /client-b/ I have a custom post type, called "case": $case_type = array( 'labels' => $case_labels, 'public' => true, 'publicly_queryable' => true, ...
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
87 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
411 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
173 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
233 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
569 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
67 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
108 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
824 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
516 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
105 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
174 views

Enforcing canonical URLs with multiple custom post types

I'm working on a project with several custom post types, where one of the post types is naturally (but not actually in the WordPress sense) the 'parent' of the others. For example, say I have a ...
4
votes
1answer
145 views

Prevent reload confirmation after AJAX save

I am saving information in the admin panel via ajax. The problem I'm running in to is the "Are you sure you want to navigate away from this page" popup appear, even though everything has been saved. ...
4
votes
1answer
1k views

Custom Post Type Archives by Date with Custom Permalink

I'm a bit stuck with getting the custom permalink for custom post type (CPT) archive to work. I've registered my 'press_release' CPT as following: add_action('init', 'press_release_post_type_init'); ...
3
votes
3answers
4k views

Custom Post Types: How-to get rid of editor (-meta box)

I'm questioning how i can get rid of the post-editor (visual + html). I tried to not register post type support, and it still appears (de-registering works fine with every other default meta box on ...
3
votes
5answers
3k views

Front end post editing using a form

I have a custom-post type with the standard meta boxes and some custom fields. How could I edit a post through a form in the frontend?
3
votes
2answers
4k views

WP 3.1 - archive pages for custom content types possible now without a plugin?

I noticed that WP 3.1 supposedly has 'new CMS capabilities like archive pages for custom content types', however, I can't see that implemented yet? I've been using a plugin called 'Simple Custom Post ...
3
votes
1answer
9k 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" ...
3
votes
3answers
2k 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
2answers
3k views

List all posts in custom post type by taxonomy

Is there a way I can list all posts in a specific custom post type and arrange them by the custom taxonomy term attached to them? For example; Taxonmy Term #1 Post Type Post Type Post Type Taxonomy ...
3
votes
3answers
4k views

How do I get a post (page or CPT) ID from a title or slug?

I've scoured the Codex, failed to get get_page_by_title() to work and am quite surprised that there doesn't seem to be a standard WP function for this task. I need to get the ID of any given post/ ...
3
votes
3answers
817 views

jQuery UI in Admin (Best Practice?)

Maybe someone has prior experience with this, but when I include the jQuery UI 1.8.9 file within my admin_head I break the functionality of the dashboard (i.e. popup for adding featured image, drag ...
3
votes
2answers
4k views

is_home() and is_single() Not Working as Expected with Custom Post Types?

(Moderators note: Was originally titled: "Custom post type problem?") I'm having some problems with custom post types where everything is working great except for the sidebars. Here is some code ...
3
votes
3answers
6k views

Breadcrumbs with Custom Post Types?

I've tried both Yoast Breadcrumbs and Breadcrumbs NavXT and I can't seem to get either to work with custom post types. Anyone had any luck with this? A single 'News' post on my site displays: Home -> ...
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
2answers
264 views

How does WP custom post types fare compared to Drupal's?

In Drupal you have the GUI to create whatever type you want. How about in WP, do I still have to code to create one?
3
votes
3answers
2k views

Forcing all posts associated with a custom post type to be private

Does anyone know of a way to add code to the functions.php file which will automatically force all posts belonging to a custom post type to be "private" and/or "password protected" with a default ...