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

learn more… | top users | synonyms (1)

1
vote
1answer
211 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
270 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 ...
1
vote
1answer
816 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
456 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
722 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
151 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
132 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
738 views

MF2 and qTranslate problem with custom post types post titles [closed]

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 ...
1
vote
1answer
1k 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
127 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
24 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
188 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
302 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 ...
3
votes
1answer
3k views

Get posts with tag all post types

I'm trying to get all posts that have a specific tag, regardless of what type of post that is. I've tried every solution I've found (here on SO and further), but nothing works: I always only get the ...
4
votes
2answers
551 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: ...
1
vote
1answer
506 views

How to use custom taxonomies to reference complex relationships?

I'm working on a site that will in part house information on products that many people have worked on in different roles. I'd like for people, the projects they've worked on, and their roles in the ...
0
votes
1answer
122 views

How can I sort posts ascending by post title for a specific post type, but on a category archive template?

How can I sort posts ascending by post title for a specific post type, but on a category archive template? My schema involves a "video" custom post type and multiple subcategories of the ...
4
votes
1answer
345 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 ...
0
votes
1answer
1k views

How To Get Custom Post Type Category Title

I have a CPT called campsites and in there I have different categories ie. derbyshire, staffordshire, nottinghamshire etc. What I want to do is that when you click on a category eg. derbyshire, ...
1
vote
1answer
634 views

Define permalinks for custom post type by taxonomy in WP 3.4

I want to create canonical permalinks for products and product types. I have the custom post types and custom taxonomy figured out, but I don't know if its possible to define permalinks with ...
0
votes
1answer
505 views

WP_Query post at custom position

Lets say I have a custom query which based on two custom post types: $wp_query = new WP_Query(array( 'post_type' => array('post-type-1', 'post-type-2'), 'post_status' => ...
3
votes
1answer
2k views

How to make a page template to list all galleries?

I'm trying to code a theme where I'll have a universal gallery page. Basically like: http://www.engadget.com/galleries/ However I'm at a loss for what I'd use to call all the galleries. I need the ...
3
votes
1answer
515 views

Custom Post Type - Same Post Name, Different Post Type

I have 4 Custom Post Types: Services FAQs Prices Before and After I want to be able to have the same post names within each of these post types, example: Services Skin ...
0
votes
1answer
102 views

Making a Custom Post Type Publish Loop

I want to re-publish all previously published products of a custom post type. Let's say the post type is "events" This is what I was thinking something like this: $args = array( 'post_type' => ...
1
vote
1answer
28 views

Disable block with taxonomies at post page

I am developing an events manager for Wordpress. I have post_type = 'event' and taxonomy 'event_place' And I want delete block with taxonomy select in post page, because user can do it at custom ...
0
votes
1answer
122 views

Extending a CPT by Created by another plugin

I'm using WooCommerce for my store, and I need to be able to extend the Coupon post type... I need to add a selectable attribute of membership_term ... How do you extend a CPT created by another ...
1
vote
1answer
425 views

Exclude custom post type from list

<?php $custom_post_types = get_post_types( array( '_builtin' => false, 'public' => true ), 'objects' ); foreach ( ...
0
votes
1answer
257 views

populate array with posts

I want to generate an array of custom post types to add it to a options array. I'm doing this to show a checkbox group populated with custom post type. I have this array: 'options' => array ( ...
0
votes
2answers
45 views

send user to first page of results when reposting to page?

I have a custom template with a drop-down that filters posts by category. I do it by making the form post to the page itself and then catching the argument and using it in a query (see code below). ...
2
votes
2answers
3k views

Using save_post to replace the post's title

I am using custom posts, and in these, I don't a need for the title. This causes Wordpress to set the titles of my posts to "Auto Draft". I'd like to change the title's value to something else, ...
0
votes
2answers
205 views

How to query custom post then display sections by meta value

This seems like an easy thing to do but I am missing something here. I have a custom post type called "recipient" and a meta check box called "yes_current" - (we help children with cancer and run ...
1
vote
2answers
258 views

Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?

Is it possible to remove custom post types from WP_QUERY that have a same shared custom taxonomy so that only one custom post type associated to that custom taxonomy is returned? Example: Get an ...
1
vote
2answers
272 views

Display custom post type in template

I have a custom post type called campsites, events and activities I want to display this in a list. So when the user click on the link, it will then display all the posts under that custom post ...
2
votes
1answer
1k views

How Can the Users Make a “Playlist” of Posts?

I have an audio website and I want to allow users to make custom playlists from posts. I am using posts as Albums which contains the Tracks. I thought of creating a custom post type and using it to ...
0
votes
1answer
55 views

Displaying tags associated with posts in Custom Post Type

I have a custom post type called 'camps', which has tags associated with it, registered as 'camps_tag' I have managed to list all of the posts from a certain category within the 'camps' cpt, but how ...
0
votes
1answer
83 views

custom post type capabilities - needs to be VERY secure

Hi I'm trying to define custom post type capabilities for staff contracts on an intranet site, so due to the sensitivity of the information this needs to have as best security as possible and simply ...
1
vote
1answer
2k views

WP query by custom post type slug/name

I am running a simple wp query to retrieve just one post. But the post is a custom post-type post, not a normal post $ajaxBike = $_GET['varbike']; $bikeProfile = new WP_Query(array( 'name' ...
4
votes
1answer
194 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 ...
11
votes
6answers
5k views

Can the Next/Prev Post links be ordered by menu order or by a meta key?

I have a series of posts that are ordered by a meta_key value. They could also be arranged by menu order, if necessary. The next/prev post links (generated by next_post_link, previous_post_link, or ...
0
votes
1answer
111 views

Prevent users from changing post status

The scenario is this: An agent enters the post data (custom post), but can only do a pending for review or change the visibility of the post. He cannot change the post status manually. I have ...
1
vote
1answer
179 views

Listing taxonomies from custom post type

I have a custom post type with several taxonomies within it Eg. the post type is called campsites and the taxonomies are various counties: cheshire, staffordshire etc. What I want to do is: list all ...
0
votes
2answers
451 views

custom post template ignored after altering permalinks

I've built a site with a custom post type called Testimonials and am using a custom template to display the posts edit: template name is page-testimonials.php. All is working as expected with the ...
36
votes
5answers
8k views

Where to put my code: plugin or functions.php?

Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php? There are many cases and many debates about that topic, mostly because there are ...
0
votes
1answer
193 views

Insert into post button missing on custom post type

I have just purchased a theme called HQ Photography from themeforest which has a custom post type called gallery. I can add images from my hard drive no problem - but if I click the media tab and ...
0
votes
1answer
119 views

Help with custom post type and custom taxonomy issue with rewrites

so I have this custom post type and taxonomy which i set the rewrite to books because I want the URL to the specific book to be http://domain.com/books/booktitle So this is what I have so far: $args ...
2
votes
1answer
1k views

Multiple Content Block

I'm trying to create a custom post type and would like that post type to have two content blocks. So that in the loop I can ask for content-1 and content-2 separately. I can write the code just ...
0
votes
1answer
622 views

Save number of Facebook likes to database

I have a custom post type called Neighborhoods, which stores information about various neighborhoods of a city. Each neighborhood also has a Facebook page. What I'd like to do is for each ...
4
votes
1answer
316 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 ...
2
votes
4answers
3k views

Is it possible to remove WYSIWYG for a certain Custom Post Type?

I dont want to use the WYSIWYG at the top of my Custom Post Type. I want to use a custom field textarea that i can place at bottom of my list of custom fields instead. Is this possible?
1
vote
2answers
1k views

Retrieving list of Custom Post Types

I'm using the following two strips of code to retrieve a list of categories (1st code) then displaying them in a select menu (2nd code), for my theme options page. I was wondering how I could change ...