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

learn more… | top users | synonyms (1)

5
votes
1answer
56 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
461 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
466 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
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 ...
5
votes
6answers
2k 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
1answer
1k 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
120 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
796 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
428 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
264 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
382 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
531 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
543 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
181 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
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 ...
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
2k views

How to use a custom post type archive as front page?

I'd like to use a custom post type archive as a site's front page, so that http://the_site.com/ is a custom post type archive displayed according to my archive-{post-type}.php file. Ideally I ...
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
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
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
5k 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
834 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
2k 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
5k 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
4k 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
4k 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
1k 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
1answer
14k views

Get Posts by Custom Post Type ,Taxonomy, and Term

Ok, so i have a Custom Post Type called "Services". This custom post type has a taxonomy called "Areas" and there's 5 terms in that taxonomy. Let's say I have 10 posts on "Services" and there's 5 ...
4
votes
3answers
574 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
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 ...
4
votes
4answers
2k 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
1answer
3k views

why doesn't the_content() work in this {single-custom_post_type.php} page?

This code is from my page single-publication.php. It outputs the relevant custom fields etc (here wrapped in template tags), but the_content() won't output the post content. I've resorted to using ...
4
votes
1answer
2k views

Linking Two Post Types

and thanks in advance for your help. I've done some searching, and this question has been answered a couple of times with reference to the "posts 2 posts" plugin, but the documentation on that is ...
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

Possible to change the URL for the regular post type without affecting the URL of other custom post types?

The Dilemma I have a few custom post types: Portfolio Items Testimonials FAQs The URL structures for these custom post types are: mysite.com/portfolio/name-of-custom-post ...
4
votes
1answer
3k views

Automatically set post title to same value as a meta box

I've removed "Title" from a custom post type that I created. Which makes it that all new posts gets the name "Auto Draft". To get around this I want to be able to fetch a value/post name from a meta ...
4
votes
1answer
360 views

Can I make user role that can only access a certian content type?

I would like make a custom role that can only access a custom content type that I'm going to be creating in the admin. Is that possible and does any know of any examples or tutorias that I should ...
4
votes
2answers
10k views

How to create a custom search for custom post type?

I have a search field for the blog posts, but I need an other for a custom post type. How can I create this custom search form with a different search result layout?
4
votes
1answer
8k views

Rewriting a custom-post-type permalink with taxonomy term?

I'm trying to rewrite my url for a custom_post_type named wr_events with one of its custom_taxonomy terms from event_type add_action('init', 'wr_events'); function wr_events() { ...
4
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'); ...
4
votes
5answers
2k views

the_author_posts_link() for authors of custom post types

I have both regular blog posts and a custom post type in a blog. The page template shows the author posts link. If you click on that link for an author that has authored some posts, that page ...