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

learn more… | top users | synonyms (1)

0
votes
1answer
159 views

create parent post using wp_insert_post

how can i create php function where i can create a post in one custom post type also create a child post type, i have already create a parent post type, i.e post type "a = car" post type "b = user" ...
0
votes
3answers
1k views

How do I get a meta value from WP_Query?

I've got the custom post type foo with meta fields called bar and baz. Now I get the WP_Query object using: $args = array( 'post_type' => 'foo', 'meta_key' => 'bar', ...
0
votes
0answers
254 views

Custom Post Type or Custom Tables?

I am trying to build an application that takes 2 pieces of input from a user and saves it to the database. This is how users enter these two pieces of input; this form will be displayed using ...
0
votes
3answers
54 views

How to bring custom meta boxes to custom post types?

I had created a custom meta box with the help of this answer but this meta box only appear in Post edit screen. How I can make it visible on "Pages" as well as on custom post types which created by my ...
0
votes
1answer
72 views

Select custom post by meta value

Say I've got the custom post type foo with a meta box called bar. I've posted an entry with bar = pineapple. Now I want to check if there is a foo in the database with a bar set to pineapple. How ...
0
votes
0answers
134 views

Why the form's get method redirects to edit.php in wordpress admin?

I have a form in wordpress plugin and i am trying to submit it using the get method. The problem is that, the form redirects to edit.php page instead my custom post type page, which is ...
0
votes
1answer
179 views

Checking whether post is deleted or saved in edit_post

When deleting a custom post type, the function hooked to edit_post is fired. How can I check if the post is being deleted?
0
votes
1answer
40 views

getting issue with custom advance fields plugin

I am using Magic Fields for custom fields. I am not able to retrieve data from my post type. I have this fields inside my post type: Now I have Page and Page template is releases.php Inside ...
0
votes
1answer
68 views

Show all post types in the same table of posts [duplicate]

I wonder if there is any way to show all post types in the same table of posts. Let's say I've got 3 different post types: Movies, Books and Videogames. Is there any way to show them all in a single ...
0
votes
0answers
63 views

Tax Query is only showing normal posts, not Custom Post types too?

This has been bugging me for the best part of a day now, so I'm appealing to help in order to calm my nerves. I run a site that has many custom post types. Every post type shares the use of the ...
0
votes
1answer
143 views

Resources to learn OOP for WordPress plugins, custom post types, etc

In a plugin, I need to create a custom post type and the associated admin menu modifications with a class rather than procedural code. What is the basic skeleton that I need to build off of in order ...
0
votes
0answers
50 views

WordPress Members Area Permalinks based on username

In a particular scenario I want a site with membership areas that give users their own member's "space". I want a permalink structure as such http://example.com/joebloggs and extend on that such as ...
0
votes
0answers
12 views

Similar to wp_editor but for the post title input field [duplicate]

What is the function that I can use to render the post title input field? I know wp_editor does that for the editor. I need to move the custom post title field (the default title that comes with the ...
0
votes
1answer
152 views

Cross post type parent page added parent page to permalink but give 404

I have made some custom post types with Magicfields. I need to set the parent page for a custom post type to a standard wordpress page. Figured that out with the help of this: ...
0
votes
1answer
83 views

Return all wordpress custom posts in specific multidimensional array

How can I get all custom posts (post_type=family_guy) with their ID and all of their tags in multidimensional array? Here is exactly how I would like my array to look like: $array = array("1" => ...
0
votes
2answers
179 views

display all posts in current category

I am trying to display all the content/posts assigned to a certain category. I have a custom post type set up called 'Videos' and within this I have created categories called music, commercial, promo ...
0
votes
0answers
549 views

add_rewrite_rule and passing variables for custom post types

this is driving me crazy!! Scenario is... Custom post type let's call it "cpt_product" setup with the rewrite "products" Trying to use the add_rewrite_rule to create a friendly URL for meta details ...
0
votes
0answers
308 views

WordPress Custom Post Type Pagination for Taxonomy giving 404

I'm developing a custom post type-based site on WordPress and have run into trouble on pagination - but only specific pagination. The custom post type has two taxonomies, pagination for these ...
0
votes
2answers
199 views

General question about Parent and Child Post type relationships

I'm hardly an expert on the matter but from reading around this Q&A site i have the following notion that one Post Type cannot be the Parent of another Post Type. What i can't seem to answer is ...
0
votes
1answer
82 views

Custom post type as page template

I've been building my very first WordPress theme using the Advanced Custom Fields plugin. Here are the steps I've taken so far: Created custom post type via functions.php. Created ...
0
votes
1answer
39 views

Custom template support for custom post type?

I know I can use single-{posttype}.php but can I use something like single-{custom-post-type-slug}.php to target a specific custom post type post? Or is there another way like a custom template which ...
0
votes
0answers
21 views

Turn Custom Post Title into external link [duplicate]

I created a Custom Post Type called News, which supports Title, Editor, Thumbnail and Custom Fields. One of the Custom Fields is URL. What I need now is to turn the Title in a external link in the ...
0
votes
1answer
81 views

Is it possible to add custom business logic to a Custom Post Admin Edit Page?

I have a custom post type that has a few fields that accept amounts. Each amount is editable. I would like to display the total of these amounts in another non-editable field on the same Custom Post ...
0
votes
0answers
89 views

Using one custom taxonomy.php for two custom taxonomies?

I have registered 2 custom taxonomies, 'allergy' and 'gmc_allergy' which are of post type 'gmc_recipe'. I have a taxonomy-allergy.php and when I go to blah.com?allergy=test then it correctly lists ...
0
votes
0answers
26 views

Plugins for putting Custom Post Types into the Menu

I have been building a website that has numerous custom post types, and I have found one called WordPress Post Type Archive Links. This would allow me to add a link to the an archive of registered ...
0
votes
0answers
425 views

Wordpress Load more posts by ajax not working

i need to get the wordpress posts while click the load more button or something else, so i have followed the tutorial by Here <?php /* Template Name: Additional Posts */ $offset = ...
0
votes
1answer
54 views

Hierarchy between post types

So I'm working on a Wordpress site for a school. I have a page called "Faculty Staff Directory" and I also have a custom type called "Staff", with teacher profiles. I've enabled the "staff" post type ...
0
votes
1answer
42 views

Fallback if statement based on the number filtered from it

I'm trying to add three ads on a page. I have a custom post type called 'ads' and I'm using advanced custom fields to add a start date an end date and an option to select which pages to associate them ...
0
votes
1answer
92 views

Custom Post Type archive loop separated by term, in specific term order

I have a custom post type registered (our-team) and I have a taxonomy (team-categories) with multiple terms. Each term has multiple posts assigned to it. On my custom post type archive ...
0
votes
1answer
134 views

how to limit query_post to first page?

I have a custom post type called listings with different taxanomies, I am using this query to display first only my post that have the type taxonomy featured. This is the code that does that : ...
0
votes
2answers
524 views

Make custom post type column sortable

My site has two custom types: Auction and Lot. Lots are connected to an Auction via the post_parent field. I added an Auction column to the Lots list in the admin area. function ...
0
votes
1answer
183 views

delete duplicate meta_value with same post_id

I've trying to cut down on the time to query a custom post type. After looking at the database and the wp_postmeta table, for some reason, there is some duplicate meta values for the same post_id and ...
0
votes
0answers
195 views

Trying to apply apply_filters to custom post type content - not working

this is kind of a strange request. I have a plugin that adds a custom post type - then the plugin has some settings where the user can select from any of the posts they created (in that custom post ...
0
votes
1answer
179 views

If you're calling a dynamic css inline style does that div have to be in the loop?

In the code below i reference "the_field( 'bg_img' )" within my first container div. The reason i do this is because i created a custom field (within a CPT) that allows the admin to change that ...
0
votes
0answers
66 views

Custom Post Types and Rewrites

I have a custom post type registered using Custom Post Types UI plug-in. It has a rewrite rule: rewrite' => array('slug' => 'apps/iphone-ipad', 'with_front' => '1'), I am using a custom ...
0
votes
0answers
329 views

get_the_post_thumbnail() returning empty string on custom post type

I've been brought in to help out with development on an existing plugin, and have run into a strange issue. Not sure if I'm overlooking something obvious here. The situation: I'm adding a shortcode ...
0
votes
1answer
367 views

Custom post type archive - error in nav-menu-template.php

I created a custom post type called 'vehicle' using the CCTM plugin and copy/pasted archive.php to archive-vehicle.php but this has resulted in an error in my header: Warning: in_array() expects ...
0
votes
2answers
445 views

How to query the content of a specific custom post type?

I have created a custom post type called "Single Neighborhood" in it i have 5 custom fields: Background Color (color picker) Background Image (image upload) Latest news (WYSIWYG editor to list ...
0
votes
2answers
57 views

If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?

One custom post type that i've created has 5 custom fields that display specific content for a template that displays them in different areas on the page. My question is if i would have to create ...
0
votes
2answers
499 views

Custom Taxonomy 404

I've created a couple of custom post types: add_action( 'init', 'register_post_types' ); function register_post_types() { register_post_type( 'jobsearch-post', array( ...
0
votes
1answer
244 views

Can you link custom post types to pages?

The reason i ask is because when i create pages they don't insert the usual name of the post type like CPT's do. For example if i create a page called toyota the URL would be ...
0
votes
2answers
495 views

Page Template Dropdown For Custom Post Types

I am using the following code to create a dropdown on the edit post screen which will allow users to choose page templates for the post type. The code is working but when I try using it multiple times ...
0
votes
0answers
52 views

Help fixing custom post type and taxonomy rewrite rules

I have a custom post type called featured_property and related taxonomy called locations and am having trouble getting the URL structure I want. I'm SO close but having trouble with the top level ...
0
votes
0answers
94 views

Cannot get query var 'post_type' to work

I am struggling to get the post_type query var (as referenced from http://codex.wordpress.org/WordPress_Query_Vars) to work. This is what the URL looks like: ?s=microsoft&post_type=bg but it ...
0
votes
1answer
68 views

Add taxonomy to custom post type archive

This is my first question so bear with me. I'm trying to setup a custom post type which has a few taxonomies associated with it. Each taxonomy is hierarchical. What I would like to achieve is a better ...
0
votes
0answers
90 views

Conflict in the urls of Taxonomy and Post Type

I have added a Custom Post Type "Review" with this code: // // Review post type related functions. // add_action( 'init', 'ci_create_cpt_review' ); if( !function_exists('ci_create_cpt_review') ): ...
0
votes
2answers
320 views

Filtering WP_Query

I'm developing a site that uses a Artist custom post type and I need to query all posts of this type in a page template. I need to set the is_post_type_archive property to true too to filter this ...
0
votes
1answer
57 views

Custom term link return 404 error

I have create a custom post type and a taxonomy while i am clicking on the taxonomy link it returns 404 error, This how i created the custom post type and taxonomy. function ...
0
votes
1answer
152 views

Save custom meta box data to database

I have a custom post type Events. Under Events, I have a custom meta box which selects the time and data of the event: <?php $meta_boxes[] = array( 'id' => 'event_date_option', 'title' ...
0
votes
2answers
70 views

Custom post type adding additional markup

I'm creating a template but every time I add a new custom post type (in this example neighborhood) it keeps injecting a new <ol> and <li> here is the code I currently have and I'm using ...