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

learn more… | top users | synonyms (1)

0
votes
1answer
755 views

Rewrite rules for using the same base slug for multiple content types

I'm not sure if this is possible or not, but here is what I'm trying to achieve. I'm using WooCommerce, and I have it setup to prepend a base slug and the product category to my product permalinks. ...
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 ...
3
votes
1answer
2k views

Restrict custom post type to only site administrator role

How can I remove this custom post type from being shown in the dashboard for non admin users? /* Add Websites Custom Post Type */ add_action( 'init', 'create_website_type' ); function ...
0
votes
1answer
288 views

Saving metabox keys and storing values as array

$key = "key"; $meta_boxes = array( "item-count" => array( "name" => "item-count", "type" => "itemcount", "std" => "", "title" => "How many items?", "description" ...
0
votes
1answer
55 views

Associate all Custom Post Types with Taxonomy

I have a custom post type imagery. I have a taxonomy publications. I need all present and future imagery post types have the taxonomy publications. Here's a simplified version of code in ...
0
votes
2answers
225 views

Custom loop request based on custom field

I have many post, all categorized. So 100 post, 40 in cat=4. All those 40 post have a custom field name point with a rating in there (how many point win). Si the question How to loop through all the ...
0
votes
3answers
3k views

current-menu-item not added on page showing custom post type (rendered with archive template)

I have setup a custom post type called 'expertizeom' I have setup a page called "expertize" and added to my custom menu (site main nav). The page is rendered with an archive called ...
0
votes
1answer
203 views

Display future posts in search

I have a search page that display's news items using the loop below, how can I only show posts with the status "future"? <?php while (have_posts()) : the_post(); ?> ...
0
votes
1answer
146 views

Redirecting search to specific templates with $_GET[“post_type”]

I'm using $_GET["post_type"] to direct my search to the correct templates and have used the following: <?php $search_refer = $_GET["post_type"]; if ($search_refer == 'news') { ...
0
votes
3answers
150 views

How to define a term for custom taxonomy

I have a custom post type called q-questions, and it has a custom taxonomy that called q-categories. I insert post via wp_insert_post and I want to define some terms for the taxonomy My code is: ...
0
votes
2answers
378 views

Saving fields in a drop-down in Wordpress

Below is code that successfully displays a drop-down menu of page templates in my Wordpress theme. I'm using this menu in a custom post type, and don't quite understand how to label it in order to ...
2
votes
2answers
351 views

Make custom post type display as a page

I am trying to make my custom post type display on the front end as if it were a page. Depending on the theme, it won't have the date, author, etc... I've looked into creating a template such as ...
2
votes
1answer
666 views

title_save_pre on post publish

I'm trying to build the title of a custom post using the values within post custom fields. The problem is that using title_save_pre only executes when I update the post, not when I create it. When I ...
0
votes
1answer
636 views

Custom post type filter is being applied to all of my posts

I've created a filter to alter the_title hook in one of my custom post types (thanks Chip Bennett for the snippet). The function is supposed to tell Wordpress to call the title from a custom field ...
0
votes
1answer
473 views

How to move a post to different post type with all meta data?

I'm trying to move a post from a custom post type called 'new cars' to 'sold cars' using the Post Type Switcher plugin, and the plugin works well, but the all meta data associated with this post still ...
0
votes
1answer
900 views

How to make WP_Query not to show irrelevant posts?

I'm using the following WP_Query arguments array: $args = array( 'post_type' => POST_TYPE, 'tax_query' => array( 'taxonomy' => ...
5
votes
4answers
393 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 ...
0
votes
1answer
462 views

Sets post_parent in custom post type posts automatically based on cpt->page name

I'm trying to write a function that will "pair" my custom post type with a page with the same name as the custom post type. The aim is that when a custom post type is saved, it checks if there's a ...
0
votes
1answer
357 views

Custom taxonomy or custom page templates?

I'm trying to decide whether it would be more appropriate to create two new custom taxonomies or if custom page templates would be easier. Here's the scenario: I have 2 custom posts types: "Cocktail ...
0
votes
2answers
1k views

Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view

I have a custom-post-type named wr_events. I have quite a lot of meta-boxes in this post-type. The post-type and the meta-boxes itself work just fine. Only thing: No matter at what post-type I ...
2
votes
2answers
252 views

Sort Posts Best Practice

I have a custom post type "Properties". These properties posts are being listed out on page "Properties For Let". Each property post has various custom meta including price, and number of bedrooms. ...
0
votes
1answer
203 views

count results in search page based on custom category

I have a seach page in which am showing results based on keyword and custom category search. Issue i am facing is that, I need to display the count of results. I had referred the wordpress ...
4
votes
1answer
871 views

How to change “Draft” string for status of custom post type to “Unavailable”?

ANSWER MOD: just an important mod to the chosen answer: // check if you actually have drafts; also avoids extra '|' separator if (isset($views['draft'])) { // 'Drafts' should be added (and come ...
0
votes
1answer
190 views

Content in WP Editor displayed below CPT shortcode [duplicate]

Possible Duplicate: Shortcode always displaying at the top of the page I've developed a couple plugins which grab CPT items through a shortcode (via WP_Query). The problem I'm having is ...
5
votes
2answers
141 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 ...
0
votes
2answers
200 views

using the loop in custom meta is messing up 'add new' post type

When I use the following code in a (wpalchemy) custom meta box, everything works fine. That is until I pressed 'add new'. At this point, the title, slug, featured image, etc.. are being ...
0
votes
1answer
158 views

Custom post type causes php-error in php version 5.2.17

I'm getting an php-error on an server that runs php version 5.2.17 which doesn't support anonymous functions. I've never heard of that before (really new to php) but found out that only php 5.3.x ...
1
vote
1answer
764 views

Custom Taxonomy Permalinks Redirection

I have set up a custom taxonomy on a custom post type using the following: (For the sake of example, the custom post type is called newtype and the new taxonomy is just called newtax. // Create ...
0
votes
1answer
39 views

Creating additional page with own URL for each custom post

I have a specific issue here. I have website using custom post types, and I need to create a specific functionality for these custom post types. From each custom post type the user should be able to ...
0
votes
2answers
2k views

How to filter Multiple taxonomies with radio buttons

To The right are the taxonomies, under them are the different terms, based on the radio selection of the terms..... i have to filter and display the car models....... The Live working can be found ...
0
votes
1answer
95 views

Make (custom) post type accessible only by custom query

I am trying to make a web application based on wordpress. This application needs some text data to process and then display to users. For that I use a custom post type. So far so good. Problem is, I ...
2
votes
2answers
63 views

Keep main articles and author blogs seprerate, News / Magazine like site

I am working on a project that requires a CNN like article structure, where there are main articles (published in a magazine 'volume/issue') and authors' blogs separate. The idea is to have official ...
0
votes
1answer
2k views

Multiple post type queries (with specific arguments for each)

So i know how to combine post types into 1 loop and out put the loop. Below is what i have: <?php $args = array( 'post_type' => array('post','movie','actor'), ...
0
votes
1answer
90 views

changed custom post type now $image_attributes[0]; broken

i wanted to change the slug of a custom post type so i renamed single-myslug.php to single-mynewslug.php changed $the_query = new ...
2
votes
1answer
2k views

get_the_category_list or get_the_tag_list for custom post types and taxonomies?

Basically I've setup a custom post type and taxonomy for a set type of posts and I'm creating a child theme from twentyeleven. When I use the default WP Posts and then I tag them and categorize them, ...
0
votes
1answer
84 views

exclude posts from a custom category

I have made a custom category "card_categories". I want to exclude some posts from that category on the category page. For eg :- category id 51 has posts with id's 1,2,3,4,5,6,7,8,9 Now I want that on ...
3
votes
1answer
589 views

Modify custom post type rewrite rules in a separate function

I want to modify the rewrite rules for a custom post type, tribe_events, which is registered as a post type within "The Events Calendar" core plugin files (the-events-calendar.class line 24): ...
0
votes
2answers
290 views

Assign post type to many users

I am working on a small course engine that has a Course custom post type and a list of users. Users should apply for courses. I was thinking about the Posts 2 Posts plugin to create the relationship, ...
0
votes
3answers
194 views

Sharing a custom taxonomy - No posts?

I've been writing up some code which enables two post types to share a custom taxonomy. From the admin side, it works fantastically - but for some reason, when I look at the taxonomy archive itself on ...
0
votes
1answer
172 views

Searching for a single custom post type, buddypress

I'm trying to show search results only for a specific custom post type, my code is simple and I already tested it successfully on some wordpress sites I made, but in this case (buddypress) looks like ...
1
vote
1answer
1k views

Remove fields on media uploader for custom page type - not working for “From Computer” or “From Url” tabs?

This code works for me if I go to upload a file and choose the Gallery or Media Library tabs then it correctly hides elements on the page. If I go to the From Computer or From URL tabs, nothing is ...
0
votes
1answer
534 views

One random post from multiple custom post types

I'm building a post grid on my front page and I'd like to show one random post per CPT. At the moment, CPT are queried out in a query array: <?php $c = 1; //init counter $bpr = 3; //boxes per row ...
16
votes
3answers
6k views

Adding categories to custom post type in permalink

I know people have asked this before and have gone as far as adding the custom post type, and rewrite for permalink. The problem is I have 340 existing categories which I would like to continue ...
7
votes
2answers
452 views

Permalink Structure for Multiple Post Type Archives by Taxonomy

Recently I have been working on an advanced WordPress project, and I'm stuck with changing permalink structure for custom post types. I have created 3 post types lets say: type1, type2, type3 and a ...
0
votes
1answer
56 views

Custom taxonomies to define versions of a product

I have a custom post type that describes components of a product. As the product is developed new components are added. I'd like to define what version of the product the component was added, and then ...
4
votes
1answer
70 views

Uploading DB to server from local is not matching the post dates

I just created a custom WP CMS and am having trouble with the custom post maintaining the correct order on the front-end. In the back end the date order is correct but is not being reflected on the ...
9
votes
2answers
13k views

Custom Post Type URL Rewriting?

I setup a custom post type for my portfolio projects. The main URL for this is located at /projects/ Now I've also setup my blog posts permalink to /articles/*/ for the permalink structure. This ...
0
votes
1answer
402 views

custom post type template changes between preview and publish

I have set up a custom post titled project where I have also set a theme file page-project.php. When I create a post under that custom post type, and I preview it, it shows on the using the ...
1
vote
1answer
12 views

Editing a list of several fields

I need to edit a list of quotes. Every quote consists of a (short) text, author's name, author's title. What is the best way to create an editor of such data in WordPress? It seems that the simplest ...
0
votes
1answer
2k views

WP_Query with custom post type ID

This code isn't echoing out anything, even though I'm 100% positive $mixtape_id is set to an integer which corresponds to one of the posts within the 'mixtapes' custom post type $query = new ...