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

learn more… | top users | synonyms (1)

3
votes
1answer
792 views

How to show the taxonomy assigned to a post in the table (where all the posts are displayed) of the custom post type?

Right now I use the following code to create a custom post type and assign a taxonomy to it: // === CUSTOM TAXONOMIES === // add_action('init', 'my_custom_taxonomies', 0); function ...
2
votes
1answer
1k views

Permalink rewrite with custom post type and custom taxonomy

I think thats a quick one: I've got: Custom post type: Food Custom taxonomy (Registered to Food): Fruits Terms in Fruits: Apple, Orange, Cherry If I type in example.com/food?fruits=Apple,Cherry, ...
2
votes
4answers
2k views

get attachments for all posts of particular post type

I'm making a widget that shows a set of images from recent custom posts. I want to run the following query: SELECT p.* FROM wp_posts p WHERE post_type='attachment' AND post_mime_type LIKE 'image%' ...
2
votes
1answer
3k views

How to change permalink structure for custom post type and it's taxonomies?

This is a repost of an earlier question I had, but I like to go into more details now to be able to fully solve this. So again, with (normal) posts changing the permalink is as easy as going to ...
2
votes
2answers
1k views

Unregister post type from child theme

I'm trying to unregister a post type from a child theme but I haven't been able to do so, the code in the funcions.php file on the parent theme is something like this: add_action( 'init', ...
2
votes
1answer
540 views

Custom Post Type: Get most recent permalink

Stupid question, I bet: I'm doing a website for an artist where I have a custom post type of "Painting". How do I get the permalink of the one added most recently?
2
votes
8answers
9k views

Filter get_categories() for taxonomy term in WordPress

I want to show a category only if a (custom) post is in that category AND region = $name for that post. So, e.g. I have a custom post (type "business") named "Mamma Mia" in child-category: ...
1
vote
3answers
2k views

How to add meta box to backend menu page

I need to add a meta box to the backend menu page, in Appearance->Menus (/wp-admin/nav-menus.php), to list all the available post types, both the defaults & the custom ones. It will contain a ...
1
vote
1answer
523 views

Custom Post Type: Set post_title equal to a custom post type field

I’ve created a custom post type for employees in a company with some fields they have to fill (like E-mail, phone, etc.) and a select box which takes some values from another custom post type called ...
1
vote
3answers
3k views

how to group custom post type posts by custom taxonomy terms

I would really appreciate if you could help me :) I'm very stuck and don't know how to proceed. I have a custom post type called event and 2 custom taxonomies registered for it: event_type with ...
1
vote
3answers
300 views

Grossly inefficient wordpress loops!

I'm working on a site at the moment for an orchestra. The various members need to be listed, according to their instrument. The members have a custom post type of biography and I'm capturing the ...
1
vote
2answers
1k views

Unable to save custom taxonomy terms in a custom-built metabox

I've roughly followed the tutorial here on how to create "custom taxonomy input panels". I'm using a custom post type of homes and a custom taxonomy called beds (used to record the number of beds in a ...
0
votes
2answers
952 views

Removing base slug from hierarchical custom post type

I have a hierarchical custom post type called "state". My goal is to have a permalink structure like thus: http://website.com/idaho/ http://website.com/idaho/sub-page I'm close but haven't quite ...
0
votes
1answer
551 views

Custom permalinks - post type - hierarchical taxonomy's

I did folowed the steps / solution from Jeff it helped me alot with he's settings, got it for about 90% working properly. But getting stuck on the post / postname. It loads now the ...
0
votes
4answers
556 views

Pagination throws 404

I'm experiencing some problems with my pagination when displaying custom post types. I would like to display 9 posts and then display a numeric pagination. This is working, some links are generated ...
0
votes
1answer
291 views

Custom field values get deleted

I created a custom post type:products which also has custom fields: price & shipping. Occasionally, if I leave the edit product window open or refresh it, I lose the values inside price and ...
0
votes
2answers
2k views

Define menu_order on Creation of New Custom Post?

I've created a custom post type called video and I'm using a plugin called Playlist_Order (which changes the menu_order field) to allow the user to use a drag and drop interface to order their videos ...
5
votes
1answer
3k views

Custom Post Type Template - Archive

I have a custom post type, called 'job', and I have the following templates in my theme: single-job.php (works fine, displays single job as expected) archives-job.php (is not recognized?) ...
3
votes
2answers
419 views

Post metadata deletes itself

I'm using a custom post type for a portfolio. I have a few option in there, bring saved by update_post_meta(), it seems to work fine, but then out of the blue (within the hour), the data deletes its ...
2
votes
1answer
1k views

Creating a custom public user page

I'd like to develop a plugin that allows me to have custom user pages. I really like the way the author archive template handles the URL: /author/username. I don't want to rewrite the author_base as ...
2
votes
1answer
230 views

Exclude post_type from admin comments_list

I'm trying not to show comments from a certain custom post type int the comments list on the admin interface. I went to the "wp-admin/includes/class-wp-comments-list-table.php" and tried to play with ...
2
votes
1answer
2k views

Multiple orderby values in WP_Query

I'm trying to come up with a query to sort by multiple orderby values. Here's what I have so far: $dept_id=2; $query=new WP_Query(array( 'post_type'=>'wpcontactus', ...
2
votes
2answers
565 views

Adding meta values to permalink

I have publications and I want to simply add year and month to the permalink. Currently the year and month of publication is added to the post as a meta value. I've set up publications as a custom ...
2
votes
3answers
415 views

Customized first post techniques

There doesn't seem to be a standard technique for differentiating first/top posts. After looking around, I found this method: $current_query = new ...
2
votes
1answer
906 views

Is it possible to associate different kinds of custom post types one to the other?

I might be thinking too hard about this problem and i'm thinking the solution might be easier than we're i'm heading. Here's what i'm trying to accomplish: there a winery website built on wp and uses ...
2
votes
1answer
684 views

Display all custom post types in archives.php

How would I do this? archive.php only has this: wp_get_archives('type=monthly'); And wp_get_archives() does not have a parameter to display all post types. Also I think archive-[post_type].php is ...
2
votes
2answers
544 views

specify meta_key / meta_value condition for prev_post_link and next_post_link

I've got a custom post type (CPT) called event. Every event has got an associated meta_key called event_date. I want to make sure that events with empty event_date won't appear in my list of all ...
2
votes
3answers
1k views

How do I filter the excerpt metabox description in admin?

I want to change the default "Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts." help text below the Excerpt input area to ...
2
votes
1answer
3k views

add_rewrite_rule and custom variable

I have been wanting to do something similar like this for a long time. I have a url http://studionumberone.com/portfolio/obey-clothing/ which just shows the jquery gallery of images, I then have ...
2
votes
4answers
6k views

Adding class “current_page_item” for custom post type menu

I am using the following to help display a list of posts created in a custom post type. <?php $args = array( 'post_type'=>'portfolio', 'title_li'=> __('Portfolio') ); wp_list_pages( ...
1
vote
2answers
671 views

Rewrite custom post type url's adding meta box values

I've got these custom post types (CPT) and meta boxes: Movies (CPT) Genre (Meta box) Genres (CPT) If one movie is called Die hard then I want the permalink to be: /genres/action/die-hard This ...
1
vote
1answer
297 views

Set post title from two meta fields

In a custom post type I have post titles disabled, however in the list of posts and in the slug it just shows the title as "auto-draft". I want to automatically take two pieces of post-meta and make ...
1
vote
2answers
429 views

Undefined index: at_nonce in custom post metabox

I'm getting this error with my custom post metabox. The custom post and metabox works fine, but if i have debug on and when i try to save any other page or post, i will get an error: Notice: ...
1
vote
2answers
91 views

Include CPT values in another CPT?

I'm trying to add CPT values in a drop-down menu within another CPT, not sure if this is do-able. Basically I have a Store CPT and a Manager CPT, in the manager cpt i have regular posts with the ...
1
vote
1answer
365 views

Custom Post Type Pagination & duplicate posts

I'm working on a template which will use some custom-post-types & custom-taxonomies.. I'm having problems with pagination and duplicate posts. HOME.PHP LOOP #1 On the homepage (home.php) I have ...
1
vote
3answers
709 views

Custom post type not displaying content from single-{custom post type} page

I am trying to create a custom post type with taxonomy and a shortcode for my custom search in a plugin.When I activate my plugin I see my CPT and taxonomy on dashboard. But when I publish the post I ...
1
vote
1answer
3k views

If on term-page -> get the current term?

I'm trying to write a kind of "breadcrumb" function in my "functions.php" I'd like to query if I'm on a term-page and if so I want to print the current term I'm in. By "term-page" I mean the ...
1
vote
1answer
479 views

How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page

This post shows how to remove unwanted fields from the media uploader. It works great, but I want to limit it to a custom-post-type and I can't seem to figure out how to do it. I've tried the ...
1
vote
2answers
1k views

List all posts in Custom Post Type but group dynamically by Custom Taxonomies

I have a custom post type named "Resources" which has a Taxonomy named "Types." I have it manually pulling each term which isn't the most elegant solution and every time there is a new term added, I ...
1
vote
1answer
800 views

I can't set meta_key in my custom post type query

I've created a custom post, events, and saved the meta data event_year to each event. I'm trying to get a year's event archive. When I go the the following URL, the meta_key and meta_value are not ...
1
vote
1answer
1k views

Title_save_pre - Simple problem that u know for sure

I have two custom post type. Then I need to use title_save_pre to post title prior to saving it in the database. I need to use this filter just for one custom post type. This is my function: ...
1
vote
1answer
1k views

Is there a way to use regular categories with custom post types?

Is there a way to use regular categories with custom post types? It seems like there is better functionality and options with regular categories (such as permalink options, etc.).
0
votes
1answer
57 views

Compare 3 custom fields and sort by oldest

I am building a movie archive. For each movie I am filling out the release dates for 3 countries, they're stored as custom fields (added via Pods) Now, when listing the movies I would like to build ...
0
votes
1answer
37 views

Debug output during filter execution doesn't work

I'm working on my first Wordpress plugin and am working on my first Custom Post Type. I'm looking to provide some debug output so I can see what kind of data I have to work with. I have the following ...
0
votes
1answer
43 views

How can I get some of a posts meta data whilst it is still inserting?

I'm trying to make a function where a child post of a certain post type inherits the same title and slug as its parent. I'm using WP Types to define my post types and their relationships. But I'm ...
0
votes
2answers
146 views

Custom wp_query pagination - next_posts_link() or wp_pagenavi() always empty

I'm aware this is a topic discussed to death, but I have read through many solutions and can't understand why my pagination simply isn't working. I have a very simple custom wp_query: $current_page ...
0
votes
1answer
215 views

How to remove/hide elements from the admin menu?

I would like to hide Pages and Comments from the editor. I tried to override them with my custom types' menu_position but it doesn't work in WordPress 3.7.1 any more. I found another way: removing ...
0
votes
1answer
94 views

Custom Permalinks for Custom Post Types and Taxonomies

I've been struggling with this for hours. I'm trying to get this URL structure: example.com/business/%custom-tax-name%/%custom-post-name%/ By custom tax name I don't mean the name of the taxonomy ...
0
votes
1answer
236 views

Pagination problem in custom post type used as front page

I am working on a theme with custom post type. the issue currently is that i am saving the layout files in a folder called templates.. and in front-page.php i am using an options check to see which ...
0
votes
1answer
133 views

Order custom posts by taxonomy?

I have the following custom post types: books, documents, examples, guidebooks, onlineaids. They were generated by the following code: ...