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

learn more… | top users | synonyms (1)

5
votes
1answer
545 views

How do you create an archive for a custom post type from a plugin?

So I'm creating a plugin to create buildings that list condos for sale. The simplest way to do this was to just create a custom post type for the buildings and then the listings but I'm now stuck on ...
5
votes
1answer
1k views

AJAX search on post pages by custom post type

I'm having an issue creating an ajax search on my single post pages. I need to limit the search results to the custom post types "fod_videos" and "post" and category 12. My issue is the search is ...
5
votes
1answer
612 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 ...
5
votes
2answers
1k views

What should I use - Taxonomies, custom fields, Post Type?

I've setup a traveling/photography blog. I want to have different post types: Traveling, Hotel Reviews, etc. For the traveling post, I want to add unique data like: City, Weather (for the current time ...
5
votes
1answer
2k views

How Do I Use The Wordpress Plugin Posts 2 Posts by Scribu?

I have a Wordpress site that relies on relationships quite heavily. It's a record label website where artists can be related to tours, reviews, album releases and store items throughout the site. I ...
5
votes
1answer
2k views

Automatically sorting custom post type admin area by a custom field

I have created a custom post type to display future events, with the event's date stored in a custom field (YYYY/MM/DD format). I'd like the admin screen for this custom post type to be automatically ...
5
votes
2answers
93 views

How to model a hierarchy for courses, levels and lessons?

I'm a bit of a wordpress noob and I'm diving head first into a course creation plugin. The structure will go program > course > level > lesson. Right now I have lessons set up as a custom post type ...
5
votes
1answer
57 views

Registering custom taxonomy with unique name, a good practise?

Is it a good practise to register custom taxonomy with a unique name (the $taxonomy parameter), and then use the rewrite argument to set a custom slug? For example, I could create a taxonomy called ...
5
votes
2answers
580 views

Meta Boxes: 'admin_init' or 'add_meta_boxes' hook?

When setting up meta boxes in a custom post type I've been do so using the add_meta_boxes hook, e.g. add_action('add_meta_boxes', 'meta_box_setup'); function meta_box_setup() { add_meta_box( ...
5
votes
1answer
4k 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 ...
5
votes
1answer
469 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, ...
5
votes
1answer
1k views

Setting up custom post type archives in WP3.1? Any luck?

I've just moved a site I'm developing to WP3.1 so that I can take advantage of and start testing some of the new features. I'm especially liking the has_archive parameter in registering custom post ...
5
votes
2answers
6k 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 ...
5
votes
6answers
3k views

visually sort ordering “custom post types” for end users

Now with those custom post types and other bits of content that don't necessarily need to be organized chronologically by date, for example: the client has a 100 T-Shirts as custom post type "SHIRT" ...
5
votes
3answers
1k views

Custom Post Type and Taxonomy URL rewrite

I'm creating custom theme for my personal website using Wordpress 3.5.1. I have problem with the WordPress custom post type and taxonomy, here's the detail: custom post type name: articles taxonomy ...
5
votes
1answer
2k views

Custom post type yearly/ monthly archive permalinks

I have a custom post type "news" in my Wordpress site. I am using Advanced Custom Fields plugin to add meta data to each post. I want to create an array of news items as an archive: [2013] ...
5
votes
2answers
124 views

Per Post Type Revision Numbers

In wp-config.php you're able to change how WordPress deals with post revisions. Specifically you're able to turn them off or specify a max number of revisions. I'd like to be able to set a max number ...
5
votes
2answers
2k views

How to set a custom post type to have viewable future posts

I've setup a CPT to act the same ways as posts but used to post event details. Thing is that some of the posts are in the future and such have a future date set on them. Problem is that normal users ...
5
votes
1answer
824 views

Confusion with adding meta capabilities to a role after registering a Custom Post Type with corresponding 'capability_type' parameter

I got quite confused with Custom Post Type (CPT) 'capability_type' parameter and adding generated capabilities to a role. So I've got a CPT called 'external_role' registered as following: ...
5
votes
1answer
2k views

Use a separate upload folder for custom post attachment upload

So, i'm trying to find out a way to use two separate upload folders, being the default one wp-content/uploads for general media uploads, and another one say wp-content/custom for one specific type of ...
5
votes
1answer
436 views

How to give a CPT (custom post type) a date based url

I have events that have an event-date custom field. I want to create a date based page to display all events for a given day, and my hope was to use the url to help with that. I have a 7 day ...
5
votes
2answers
4k views

Wordpress Custom Post Types with a page as a parent?

I have a lot of custom type items in my new WP project, and for navigation reasons, I want to make the parent to some of them a Wordpress page. The problem is that apparently, Wordpress does not let ...
5
votes
2answers
309 views

Merge two custom post types into one admin page?

I am building a site with 4 custom post types. To make things easier for our client/admin, I'm wondering if there is a way to merge those custom post types into one list in the backend? Like if you ...
5
votes
4answers
386 views

Why have my custom post type searches stopped working after changing URLs / updating WordPress?

IMPORTANT UPDATE: I've realised that my problems could also lie with the WordPress 3.3 update. A while ago I posted a solution to my own question about searching Custom Post Types. At that time, I ...
5
votes
1answer
545 views

Show all sticky posts, WITH pagination

Trying to get a custom admin link working for a custom post type. I've managed to add a link to show all "sticky" posts next to the usual "All", "Published", "Trash", etc., but the actual query isn't ...
5
votes
3answers
592 views

Taxonomy term in permalink

I have a big problem. I have been banging my head on this all day long. It seems to be a stupid easy question. Possibly also with a stupid easy answer. But I can't seem to find it. What I want is ...
5
votes
1answer
185 views

Will a post object's “post_name” always be equal to the “path” on non-hierarchal custom post types? (using get_page_by_path() function)

The Short: When feeding the path into get_page_by_path() something like this: $post_object = get_page_by_path( 'path_of_post', OBJECT, 'my_custom_post_type' ) ... Assuming the custom post type is ...
5
votes
1answer
3k views

How can I rewrite URLs to pass taxonomy and post type values to the query?

So I have a site with about 6 custom post types.Three of these post types are attached to a single custom taxonomy. I would like to be able to list_cats in the sidebar and spit out a url like ...
4
votes
4answers
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 ...
4
votes
5answers
1k views

Large Uploads in WordPress

I'm working with a church that uses WordPress to manage their website and podcast. So far, they have a 200-step process every week for publishing the podcast (I exaggerate, but it is a huge ...
4
votes
2answers
5k views

Adding a Custom Post Type into the menu screen

I need a way of adding custom post types to the "Appearance-->Menus" option in Wordpress. i have created a custom post type with: register_post_type('produksjoner',$args); All examples I find just ...
4
votes
3answers
1k views

clients list using wordpress

I am using wordpress for my new website and i have list of clients(name and their logos). I am confused how to make those editable using wordpress? Html as follows... <ul> <li><img ...
4
votes
3answers
3k views

How to add relationships between custom post types?

Let's say i have a sample post called "avatar" in "movie", "trailer", "review" and "details" custom post types. How can i display in the "movie" custom post type the content + links to "trailer", ...
4
votes
2answers
2k views

Redesigning Custom Post Type “Add New” page

I've been browsing all over google for a solution to this. I'm writing a custom post types plugin for work to log-in visitors that we get. I initially wrote a mock-up without custom post types, then I ...
4
votes
6answers
1k views

Creating relationships between multiple content types

I'm working on a site where there are multiple content types in addition to the built-in ones (see list below). I'd like to establish the ability to mark related content in any direction, from any ...
4
votes
4answers
6k views

How do I add a new custom post format?

How do I add a new custom format while making a post in WordPress? The default formats are standard, aside, image, gallery... I want to add a new format of 'xyz' name. How can I do it?
4
votes
3answers
864 views

Best way to create list of gigs for Wordpress theme?

I'm currently designing a musician's wordpress theme, and am looking to create a user-controlled dynamic gig list. It doesn't have to have a link to any event pages, just a simple "where, when, with ...
4
votes
3answers
3k views

Creating a default Custom Post Template that a Theme can override

I'm in the midst of building a Wordpress Plugin that adds a custom post type, for which I'd like to include a default template to display. Essentially, this is an event management plugin, and the ...
4
votes
3answers
5k views

Custom Post Type Archives by Date and Taxonomy

Lets use the classic example of a custom post type called "movies", with its own taxonomy called "genre". By registering the custom post type (with a "movie" slug), the permalinks are already set up ...
4
votes
4answers
6k views

Sorting a query by custom field date

EDIT: Reworded the question for more clarity I'm trying to sort by custom meta box data, which I am converting to a date using the strtotime function, but I'm having some difficulty. My chief ...
4
votes
4answers
5k views

Fail to compare dates in meta_query

This is the piece of code I use to get event posts whom date metadata is newer than today : <?php query_posts( array( 'post_type' => 'concerts', 'meta_key' => ...
4
votes
3answers
11k 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 ...
4
votes
3answers
5k views

Hook for post and page load

I need to run a function when a particular post or page is loaded. Is there any hook that lets me check whether a post is being displayed during page load ?
4
votes
3answers
2k views

How do I change the author of a custom post type?

I have made a custom post type and need to be able to create posts and assign them to authors. It is easy to do this with posts as you can go to the bulk edit screen and immediately change the author. ...
4
votes
3answers
596 views

Post formats “audio” and “video” only showing in index.php

I have files in my theme called single-audio.php and single video.php, but when I click on an audio post-format or video post-format wordpress uses the index.php instead of my single-audio.php or ...
4
votes
4answers
3k views

meta_query for keys that aren't yet set

I'm trying to query for a custom post type for a gallery system. I have a checkbox to set a gallery as a "featured" gallery (set up through More Fields plugin) - if this is checked then the meta value ...
4
votes
1answer
3k views

Search multiple custom fields by using meta_query

I'm trying to create a search results listing for a custom post type and the problem I'm running in to is with the way the 'meta_query' parameter is stringing the passed values together. It appears ...
4
votes
2answers
1k views

Custom Post Type Plugin: Where Do I Put The Template?

I'm writing a custom post type plugin. Part of it I'm outputting to the template via shortcodes. But other parts need a custom post template, and I figured out how to use the template hierarchy for ...
4
votes
4answers
3k views

Front end registration/login & publish/update 1 custom post

I want to be able to allow a user to register/login via a front end form and be able to create 1 custom post which only they will be able to edit and update via a front end form. This will be part of ...
4
votes
4answers
2k views

Do I need a nonce field for every meta box I add to my custom post type admin?

I'm currently working on the admin page of my custom post type, and I got stuck on deciding whether to add a nonce field again for the second metabox or not. I'm very new to custom post types, and ...