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

learn more… | top users | synonyms (1)

2
votes
1answer
128 views

Create second custom 404 page for selected post type

I created a new custom post type called event, which works fine. I also created a custom 404 page template, which is shown if a event/page/post is not found. But now the hard part, i want to create ...
0
votes
1answer
234 views

Give a permalink to Custom Post Types without title

I have a "report" Custom Post Type registered in this way: register_post_type( 'report', array( 'label' => 'Reports', 'description' => '', 'public' => true, ...
0
votes
1answer
109 views

Query Custom Post Type and sort by year

How do I create a page template were I can query all the posts from the Custom Post Type - let's say - "project" and order the results by year, displaying the year value at the beginning of each group ...
1
vote
3answers
897 views

Limit the word count in the post title

Is there a way to limit the word count of the post title? I searched over the internet but found nothing. All I know is, only the content of the post can be limited or excerpted.
1
vote
1answer
384 views

How to add a Custom Meta Box for more than one Post Type?

I am using the following code in functions.php for adding a custom meta box. The custom post type is themes. I want to add more post types, how can I? add_meta_box( 'my-meta-box-id', 'Demo ...
1
vote
3answers
2k views

Custom post type save_post action not firing

Sorry if this is already answered on here. I looked around and couldn't see any answers to my question so I thought I'd post my own. I'm building a plugin for a client that gathers customer feedback ...
2
votes
4answers
381 views

Debug whats going on inside a function called from AJAX

I have a link on my post edit page (admin side) that calls up AJAX and jQuery to run a function inside my functions.php page. The link is wired up and calling the jQuery but I can't seem to debug ...
0
votes
3answers
94 views

How do I enforce a specific custom post type on the loop

I am developing a blog where the main posts are of a custom post type. Let's assume it is a Book custom post type. I want the /author/admin page to list the books of the author admin, but instead, ...
0
votes
1answer
150 views

Pagination not working on homepage

I tried multiple solutions but its not working. When I go to /page/2, it doesn't work. I'm executing custom query in index.php of my theme. if ( get_query_var('paged') ) { $paged = ...
0
votes
1answer
230 views

Custom Loop for custom post type. Compare by meta_value?

I'm a bit confused. I have a custom-post-type named wr_event. I'm using the code underneath to loop through all "upcoming" events (defined by the meta_key `event_date). The problem I have now is that ...
2
votes
1answer
133 views

Custom post type with tags

My understanding is, that custom post types can share tags with the posts also. I have created tags and applied them to a blog post and a custom post type. Yet when I click on a tag it only returns ...
0
votes
1answer
73 views

How to store datetime from custom meta box so that it can be sorted by

I have a custom meta boxe on a custom post type that has two date time fields. I will need to sort by these fields and also return posts that contain a date between two dates. Will WordPress ...
1
vote
1answer
139 views

How to rewrite custom post type URL for multiple depths instead of one specific depth

I got this code that rewrite the url's for custom posttypes. It works but only for a depth where the posttitle is on the 5th segment. How can i adjust it so it accepts multiple depths? e.g.: ...
2
votes
1answer
189 views

Show admin help message across custom post type parent and child posts

In my custom plugin, I am using the following code to display an info / help box. This is working great for the main admin edit screen that lists the custom posts, but how can I extend this to show ...
1
vote
2answers
592 views

Add specifications table for products page

I have a WordPress issue that has been keeping me busy for a few days. I'm currently building a website for a client. This website will show products and each product page also has a table with ...
1
vote
1answer
687 views

query related posts in a custom post type by a custom taxonomy

I'm trying to display related posts by a custom taxonomy and only have the solution for related posts using a category. $orig_post = $post; global $post; $categories = ...
0
votes
1answer
51 views

Types plugin breaking because of server configuration

I have tested this on three different hosts, using a number of different versions of both Types and WordPress, and I believe I've narrowed it down to my host (Firehost) setup, which they recently ...
0
votes
2answers
208 views

404 Error On Custom Taxonomy Pages 2, 3, etc

I've been reading a bunch of posts about this with no luck so far. I can't seem to figure out what is the problem. I have the following: Custom Post Type: Sermons Custom Taxonomy: Series My urls ...
0
votes
1answer
362 views

Custom post type specific category box

Is it possible to give a custom post type its own category box? If I use 'taxonomies' => array("category") or register_taxonomy_for_object_type('category', post_type); I get the desired box but ...
0
votes
1answer
253 views

Help integrating Custom post type meta field with custom profile fields

I have a custom post type for "locations" and I need to have "users" log in and be able to pick a location that is within a certain distance from them. I have added some spots to the profile using ...
0
votes
1answer
52 views

Setting a Master Menu on a Custom Post Type

I am currently developing a site for a car dealership to list their inventory. I have setup the car up as a custom post type. Each post will have children (gallery, features, accessories, etc). I ...
1
vote
1answer
182 views

Add a button or image button that calls wp functions in the wp-admin

I have a custom post type of products that I've setup to upload PDF's using metaboxes. When I generate the metaboxes on the wp-admin, I look to see if the metabox already has a pdf uploaded to it or ...
1
vote
2answers
383 views

remove custom taxonomy metabox form custom post type

I have created a custom post type 'hotel' and custom 'taxonomy' so when administrator creates a new hotel and saves it it related custom taxonomy automatically get created but I don't want to show ...
0
votes
0answers
21 views

How to order posts by taxonomy in WP_Query [duplicate]

Possible Duplicate: Using wp_query is it possible to orderby taxonomy? I have a page template that should show CPTs grouped by taxonomy. I'd like to get all the CPTs in a single query and ...
0
votes
1answer
54 views

Create a Page Templete to Display Table Of Content for Custom Taxonomies

I have created a custom post type named "Training" & a Custom Taxonomy for the same named "Table Of Content" I need to create a Page template to display Table Of Content Something like this ...
0
votes
1answer
740 views

Invalid file type when using wp_upload_bits to upload PDF to a custom post type

I'm trying to upload a PDF file for a custom post type called Products using wp_upload_bits. I'm only doing this in my wp-admin. I don't want these files added to the media library, I just want to ...
1
vote
1answer
434 views

Checking if $_FILE isset for an array of file upload metaboxes

I have been struggling with this for almost 2 days with no avail. I have a custom post type of PRODUCTS that has a group of metaboxes for uploading PDF files in the wp-admin. I've created the ...
1
vote
2answers
273 views

Page template with different page and post content

I am using a wordpress theme which has a page template named roomtypes. I am not a php pro but as far as I understand this template gets the posts. When I add a Room type, it is created as a post with ...
1
vote
2answers
346 views

Multiple templates for a custom post type

As new user to wordpress I'm finding that the preset templates structure a little restricting coming from the flexibility of other template routed CMS I've worked with. Saying this, I know there are ...
0
votes
2answers
106 views

Check IF single OR multiple custom data has been entered

I'm building a single template right now for a custom post type. I'm wondering if there is a way to check if either at least one or multiple of the custom values has been entered so I can display the ...
3
votes
2answers
298 views

Using Offset in Custom Post Type Query

I'm using the following query for a custom post type: <?php $posts = get_posts(array( 'numberposts' => -1, 'offset' => 20, ...
2
votes
3answers
720 views

Add 32x32 icon to custom post type index page

I've setup an "album" custom post type and want to add an icon on the index page where the RED circle is (see image below; from wptheming.com). Here's my function to replace the icon. The CSS is ...
0
votes
1answer
24 views

Correct way of adding taxonomy to a custom post type

Just something I´ve been wondering for a while: The Codex shows us two ways of attaching a Taxonomy to a Custom Post Type: Using the taxonomies argument in the register_post_type function Using ...
1
vote
2answers
207 views

How to set a custom post type to not show up on the front end

I use a custom post type in one of my sites for image slideshows. I have publicly queryable set to false/off but when Google crawls my site I see 404 errors for the URLs for my slideshows. I thought ...
3
votes
1answer
498 views

Make featured image required

Is it possible to force user to set featured image on some types of posts. For example I've got custom post type mm_photo and I want to show some error message or somehow block user from publishing or ...
2
votes
0answers
291 views

Post Link Filter Help

I Am probably being a complete tool here but I am trying to change the permalink on my custom post type to a particular category child. The code in essence works but I cannot for the life of me figure ...
3
votes
2answers
513 views

How to Debug the 'save_post' Action?

Is it possible to validate PHP code? I have a Custom Post Type (Film) with Custom Meta Boxes. Everything is working fine, I can add new Films and details to the Custom Meta Boxes. My problem is ...
1
vote
1answer
132 views

Importing Data from a Non-WordPress database, into WP

I'm migrating data from a totally different database style into WP. The main issue I'm trying to wrap my head around is how to import any meta data, given that WP uses a key value pair style for meta ...
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 ...
0
votes
1answer
320 views

WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)

I'm trying to write a new "related posts" widget (for the single post view) for my custom post type, filtering by custom taxonomy terms that the related posts should have in common with the current ...
0
votes
1answer
346 views

Understanding Post Formats/Custom Post types Etc

I don't understand what "Adding Post Type Support" is for when we have "Adding Theme Support"? For different post-formats this is the way I was shown before. This is then how I did it for the project ...
0
votes
1answer
259 views

SQL query - get ids - Advanced Custom Fields / WPeC

I need to query the database on add_action( 'init', '...') to find post ids with the field 'product_discount_option' set to true. I know at least one of my product posts have the field ...
0
votes
1answer
123 views

Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?

under Settings->Reading I can set which page should appear immediately when visiting my site as "home-page". In my case I want the archive of my custom-post-type named "events" as home/front-page of ...
0
votes
1answer
111 views

Making a form for user to add new custom post with custom taxonomies and custom fields

I want to ask that is there a way display all my custom taxonomies in a drop down menu with checkboxes so when the user check any taxonomy it will be slected and when the user click the submit button ...
0
votes
2answers
554 views

MF2 and qTranslate problem with custom post types post titles

I'm creating custom post types with Magic Fields v2.0.1 and i use the qTranslate v2.5.32 plugin for a second language on Wordpress 3.4.2. The problem is that on Magic Fields in the settings of the ...
0
votes
1answer
437 views

Get random custom posts from a custom post type

I created a custom post type named predic, I’m trying to get within one of this post other four random posts from the same custom post type. I used this code, but I keep getting the same post I’m in 4 ...
0
votes
1answer
115 views

Make Next and Previous on single-$posttype.php use the same order as archive-$posttype.php

I have a custom post type events and am displaying these events using archive-events.php and single-events.php from the template hierarchy. I have a custom query in archive-events.php $paged = ( ...
0
votes
2answers
23 views

Custom Post Type - Main page for certain posts

I've successfully added a custom post type. register_post_type('case', array( 'labels' => array( 'name' => __('Cases'), 'singular_name' => ...
1
vote
1answer
105 views

Custom page sidebar using Template dropdown box

i am wondering how i go about making a Template for some of my pages to use a different sidebar? I have created the widget like this: register_sidebar(array( 'id' => 'ourPat-sidebar', ...
1
vote
1answer
144 views

category.php displays ALL posts instead of just those with the current category

I'm simply trying to display a list of categorised posts (with the custom post type of 'project') on the default category.php page. I can't get it to work! If I simply use the base theme category.php ...