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

learn more… | top users | synonyms (1)

1
vote
2answers
1k 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
137 views

Plugin fatal error

I'm trying to activate a plugin I made on a network site. I'm getting an error: Plugin could not be activated because it triggered a fatal error. I have the debug mode on and it outputs all errors ...
2
votes
1answer
480 views

Adding paged query to custom URL rewrite

I have set up the following to create 'pretty' post type and category permalinks: function kdev_add_category_rules() { $post_types = array( 'kdev_photos', 'kdev_videos', ...
0
votes
1answer
52 views

Looping taxonomy in taxonomy?

So I have a CPT of references (like a dictionary kind of format for music). In it there are two taxonomies: medium_reference and reference_letter. The reference_letter lists letters A-Z, while ...
1
vote
1answer
3k views

How to get my Custom Post Type to display in Recent Posts using “pre_get_posts”

I created a Custom Post Type (call it "my-post-type"). I created an archive-my-post-type.php page for displaying all the Custom Post Types. Looking at the "Recent Posts" section of the Sidebar, I ...
0
votes
1answer
38 views

Take stored email addresses from custom post type & turn into one string

I have a custom post type, which has email and names stored. I would like to take these email addresses and concatenate (join them) together into a single string. This string will be stored in a ...
7
votes
2answers
4k views

Creating a Custom Post Type as a Plugin? Why?

I've been experimenting with creating a Custom Post Type as a plugin (because I've seen this recommended in various places). But I have a question not about the how, but rather the why of building ...
0
votes
1answer
204 views

Template with Custom Post Type (Custom Tables) does not work

I'm using a Custom Post Type (CPT) my-project stored in a custom table MY_PROJECT. Here is the CPT registering code: $labels = array( 'name' => __( 'Projects ' ), ...
1
vote
1answer
533 views

Trying to add script to specific admin page is not working

What I am trying to achieve is to load a .js file on an edit.php page, however the code is not working specifically for this page. I've applied the same code type of code to other CPT pages, but for ...
0
votes
1answer
172 views

Custom Post Types (Changing post style based on category)

thanks for your attention. I have a custom post type I've built called "Portfolio Items". These posts layout a nice 6 column grid and are contained within 4 different categories. I've created 4 ...
0
votes
1answer
452 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
600 views

post in a lightbox?

Ive installed "lightbox plus colorbox" plugin and im trying to call the latest post from the CPT notices. the notices have post expiration so essentially im looking to display the latest alert on the ...
0
votes
1answer
6k views

List the categories under custom taxonomy

I have a problem here, I registered a custom post type and I named it 'recipe' then I created a custom taxonomy under the post type, I named it 'recipe category'. Now I want to display the of ...
2
votes
1answer
859 views

Admin Area Custom Type Search By Meta Fields Without Title & Content

I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code: ...
1
vote
1answer
4k views

Custom post type archive and single.php files not working

Hi I've created a custom post type called shows. here is the code for it. <?php add_action('init', 'show_register'); function show_register() { //arguments to create the post type. ...
0
votes
4answers
141 views

Shortcode is displaying the wrong post_title

I have got a shortcode that displays a custom post type, via a foreach. The shortcode has been used in the standard post type. I have used the_title(); in the shortcode. the_title(); outputs the ...
1
vote
2answers
170 views

wp_insert_post sometimes fails after API call

I have built a plugin that fires an Ajax call to connect to a third-party API. That API returns some Json, which I then save as a custom post with wp_insert_post. Now, usually, this works. But, now ...
0
votes
1answer
884 views

WP_Query of a custom post type isn't working

I am trying to WP_Query a custom post type. I would like to display the post_title s in a list. Here is my code, it doesn't seem to work: <?php add_action( 'init', 'custom_faq_type_mp' ); function ...
1
vote
1answer
55 views

Is it possible to create Custom Post plug-in?

I understand that Wordpress allows you to create Custom Post Types with Custom Fields, but is it possible to create a custom Plug-In that creates and maintains its own Custom Post type (outside of ...
0
votes
0answers
590 views

Archive Page Pagination not working

I am using the following template for a custom post type. The pagination does not work as you can see at http://www.xava.ie/testimonials Any hints as to why it is not working for me? <?php ...
0
votes
1answer
53 views

Creating Multiple Admin Widget Page with Calling One Sidebar

Does anyone know how to create multiple admin widget pages with calling specific sidebars? In Detail, I have a custom post type called Groups and I am creating new admin pages in the back end. I ...
1
vote
2answers
70 views

Display random posts, but omit the post it is on?

I am trying to have a section under a single post where it displays completely random posts. I got everything working, but every once in a while one of the random posts that get displayed is the ...
0
votes
1answer
119 views

Enable comments for post when comments meta box removed

I've hit the issue described in '11: "Enable comments for post with comments meta box removed" and I'd like to ask for your help to adapt the mentioned there code to the current wordpress version. I ...
0
votes
1answer
75 views

How to prevent a custom post type from using the archive.php template?

I have the following: //Jobs register_post_type( 'jobs', array( 'labels' => array( 'name' => __( 'Jobs' ), 'singular_name' => __( 'Job' ) ), ...
0
votes
1answer
330 views

How to add a post counter to the list of custom taxonomy terms?

I am using the below code to display the list (radio buttons) of terms that are currently used by existing custom post type posts: $args = array( 'taxonomy' => 'typ', 'post_type' => ...
0
votes
1answer
495 views

Custom Post Types Archives and Single Pages not showing custom taxonomy data

I have a custom post type called "Newsitems" that I have registered two custom taxonomies for: "newsitem types" and "news item tags" I want these two taxonomies' terms to appear almost like the ...
0
votes
1answer
3k views

Filtering a WP_Query meta_query by numeric values isn't working

That was a very dense title. I have a custom post type "event" which has a Date/Time picker field "event_date" thanks to the Advanced Custom Fields plugin. This Date/Time picker saves a UNIX ...
2
votes
1answer
148 views

How to remove thumbnail sizes for specific post type on a child theme?

The theme I'm using includes a slideshow that generates an additional 4 image sizes for every image that is uploaded. I don't need to have all those images being generated for every image. Is there ...
0
votes
2answers
2k views

Custom post doesn't show featured image

I'm probably missing something but somehow my custom post type doesn't display the featured image input field when creating the post. I have the featured image already registered in my functions.php ...
0
votes
1answer
303 views

Add an A-Z menu at the top of A-Z listing code

I have the following code that is creating a and A-Z listing of my Posts in a Custom post type. I'd like to somehow create a A-Z menu at the top which links down to its respective anchor. I just can't ...
2
votes
1answer
8k views

Get Posts in a Custom Post Type category

I have trouble in getting post in a custom post type category. I have code below but it doesnt work well. It still get posts in another category. <?php $query= null; $paged = ...
0
votes
1answer
162 views

Showing custom post type categories in the menu

here is my custom post type and category: //Register nav register_nav_menus( array( 'main_nav' => 'Main navigation' ) ); //Custom post types add_action( 'init', 'create_post_type' ); function ...
0
votes
1answer
565 views

WP_Query order custom post type with certain meta key value by post modified date

I have this query to show custom post type "property", and it works really well but the "orderby" statement, that is completely ignored... $args = array( 'post_type' => CUSTOM_POST_TYPE1, ...
2
votes
1answer
403 views

Frontend posting - everything saves other than checkboxes?

I have a form on the frontend of Wordpress which is saving all fields except a checkbox array. It displays and saves the correct values if I tick the boxes in the backend post editor, and the ticks ...
0
votes
2answers
123 views

template page to show custom a post types only

Does anyone know how to make this page template to only show knowledgebase post types? I've tried various different ways but with no luck <?php $cat_args = array( 'taxonomy' => ...
0
votes
1answer
498 views

Change Post Meta via AJAX from the posts list table

I've been looking around for this for a while but haven't found anything as of yet. I have a custom post type - "books" and this post type has a custom meta field of "availability". I would like to ...
-1
votes
1answer
331 views

Custom Form Data save after Login User

This is form on my first page. I have to manage if user is not logged in, in that Case after submit form action is Login Page. <?php/** Template Name: Form */ get_header(); ?> <form ...
0
votes
0answers
121 views

Custom Post Type and Taxonomy pagination permalink

I have a custom post type of galleries with pagination for the posts thumbnails. It worked great until I activated the permalinks in the WP admin panel. I saw many posts on this problem but none of ...
2
votes
1answer
64 views

CPT in Posts tab instead of its own tab

I was wondering for CPT list and editing pages to show under Posts tab instead of creating its own tab. I really want to use CPT (over using categories) because I'd have control over capability and ...
0
votes
0answers
969 views

Creating a menu that lists your custom post types with wp_list_pages()

I'm stumped on this, it is something I've gotten to work on other sites, but I must be overlooking something here. I'm trying to create a secondary menu for my custom post types ('staff') with ...
1
vote
1answer
38 views

Include custom post type in “all posts”

(Working of off an existing team that the client already purchase.) I have a WordPress install with a couple of custom post types: portfolio testimonials I've set the taxonomy to hierarchical' ...
1
vote
1answer
432 views

Use Custom Post Type as Custom Field

I want to create a custom post type for store that having all store names and it is working. Now I want to fetch the all stores in a select box in every new post of WordPress, then selected store name ...
0
votes
1answer
552 views

Insert data in custom table during new post creation

I want to in insert data in my custom db table when creating a post. Suppose there are three categories (php, wordpress & jquery). When i create a post in wordpress, i want to insert post id and ...
2
votes
4answers
2k views

Display Posts from Custom Post Type with Category Filters

Thanks in advance for any assistance. I have a simple 4 page portfolio site I'm trying to build for myself. The pages consist of: Home Page, Print Design, Digital, and Identity. I have created a ...
0
votes
1answer
169 views

Missing categories for Custom Taxonomy and Custom Posts

I'm having trouble seeing why categories are not appearing for Knowledge Base and Articles. What's wrong with this code? <?php // Custom post types /* faq */ add_action( 'init', 'faq_post_type' ...
0
votes
1answer
251 views

Author template - separate custom post type by custom taxonomy term for $curauth

Basically I have a post type called photograph, I then have a Taxonomy group called "Subject" and several tax terms i.e. Abstract, freeze frame etc (Approx 18 in total) under that Taxonomy group. I ...
0
votes
0answers
129 views

Retrieve post data via WPDB class

I'm trying to figure out doing a custom query using the $wpdb Object. I have custom type posts, event_posts, that have meta data, images, as well as event dates which are input in the post with the ...
0
votes
1answer
86 views

Are Post IDs Unique Across all Post Types?

I thought Wordpress post IDs were only unique within each post type, so that the first instance of each post type would have an ID of 1 and they would count up from there. In order to get a specific ...
0
votes
0answers
21 views

Plugin works for default post types, but not for custom [duplicate]

I've coded a plugin that adds a meta box to the post page. When the post is published, the plugin will generate a random ID for the post, and insert the random ID and the post guid to a custom table ...
0
votes
1answer
4k views

QTranslate for Custom Post Type [closed]

How to add qtranslate-support for custom post type? Just saving text with tags OR add flag switcher. My Custom Post Type field: add_meta_box('project_rolesid', 'Roles box', 'project_roles', ...