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

learn more… | top users | synonyms (1)

0
votes
1answer
545 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
0answers
5 views

Permalink custom post type and custom taxonomy

I have problems with making permalinks. I have multiple custom post types. Lets say cpt1 cpt2 cpt3 I have one custom taxonomy with few categories. Lets say : cat1 cat2 cat3 All custom post ...
0
votes
1answer
10 views

Meta Box doesn't appear

I have 3 custom post types and 3 meta box files. The problem is I include files in functions.php. I have three meta box PHP files for each custom post type, but it just shows one meta box fields of ...
0
votes
0answers
9 views

Custom post type shows all if no post from user

I'm trying to achieve this (without using any plugins): Adding custom post type Allow subscribers to create, edit, view their own posts "only" in wp-admin I'm using this code: ...
0
votes
2answers
33 views

Certain number of posts with certain excerpt length

Could use some help... using this code to call up a custom number of posts from a certain categorey and only want to display the first 15 characters. However, it is showing the same excerpt on each ...
0
votes
2answers
2k views

Get image post ID in media upload

I am developing a plugin that adds a Custom Post Type to my theme. It's a retail directory and the post type is a retail listing. Everything is working fine. I can upload content to the DB and then ...
1
vote
2answers
4k views

Show custom taxonomy inside custom menu

I have a custom menu using add_menu_page: add_menu_page('My menu' , 'Some text', 'read', 'nwcm'); Under it, I show a custom post type menu item; // Create the news custom post type ...
0
votes
1answer
47 views

Custom post type and category link together

I have issue with making new page for this : Category link is : /category/category_name But I want to be : /custom_post_type/category_name Custom post type code $labels = array( ...
-2
votes
1answer
12 views

How to attach multiple images to post title using front end form and retrieve them? [on hold]

Photo //upload to dashboard $_POST['fname'], 'post_content' => $_POST['message'], 'post_status' => 'publish', ...
0
votes
0answers
9 views

Strategy for organizing JSON/tabular data the wordpress way?

Situation: Have to import about 20-100 JSON objects into wordpress, which will NOT be displayed at all, but will be processed with other data for view. Example JSON input: { "headers": [ ...
0
votes
1answer
873 views

Search Custom Post Type & Taxonomies

The site I'm building has a directory element, which has a lot of different business listings; this is a custom post type. It has a Custom Taxonomy called Trades under which are different types of ...
0
votes
1answer
14 views

Listing posts with wp-cli

I use wp-cli to export some posts from my WordPress database. I'm trying to understand the differences in behavior that are exposed in the example below: $ wp post list --path=/var/www/home-web ...
0
votes
1answer
618 views

Wordpress monthly archive links result in 404

When I use the archive widget in a sidebar, it creates the normal monthly post archive listing like the following: February 2014 January 2014 October 2013 and so on. Whenever I click on these ...
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
2answers
428 views

Bulk edit custom excerpt text in WordPress

Is there a way to bulk edit the custom excerpt text without going to each post and open it? When we have 300 posts it can be a very time consuming process.
2
votes
1answer
898 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
0answers
12 views

Add custom capabilities to existing custom post type

The only way I can find to associate post types with custom capabilities is during the register_post_type function. I'm looking to add a capability for a certain role (my_role) for a post type that ...
13
votes
2answers
7k views

Creating an Image-Centric Custom Post Type?

Does anyone have any tips for creating an image-centric custom post type? To elaborate, my blog has rotating header images, shown below: The two images in the top left are randomized, and exist as ...
1
vote
0answers
20 views

Custom Post Type relationship with hierarchical parent and child permalinks

Trying to get my permalink and url structures to behave nicely. I have a Custom Post Type called Diseases. This post type is hierarchical with parent and child relationships. I have another CPT ...
0
votes
1answer
659 views

Getting custom taxonomy posts on archive page

Hi I am not sure if the question is understandable or not but what I am trying to achieve I will explain. I have a custom post type called menu item and custom taxonomy called menu item type. CODE ...
0
votes
1answer
2k views

How to get custom post type title, excerpt, thumbnail and permalink by post ID?

I have to generate several "loops" to get the title, excerpt, thumbnail and permalink of a custom post type 'charity' by post ID, because I will have multiple posts (charities) I need to target with a ...
0
votes
1answer
470 views

Unable to display paging navigation with a custom post type loop

I have used a starter pack for my WordPress theme development, but I can't display the navigation on a custom post type loop. The framework starter is : http://underscores.me/ There is my PHP Code ...
0
votes
2answers
3k views

Conditional two level dropdown filter for custom post type

I have set up a custom post type and taxonomy. The post type is called Local Services and the hierarchical taxonomy is called Regions. The Regions have child categories called Areas. I have set up a ...
0
votes
0answers
26 views

Make shortcode work in all posts displayed by loop, not just the first one

I have a post archive displaying post and author meta at roadtripsharing.com/road_trip I added a do_shortcode(); in the loop, specifically related to the "New Message" button which opens a dialogue ...
1
vote
1answer
520 views

301 redirect for converted post type

I just converted my posts from the default 'post' type to a variety of different custom post types based on what category the post is in. E.G. Posts in the "News" category are now a custom post type ...
0
votes
0answers
33 views

How Do I Attach Custom Taxonomies to a Custom Post Type?

I'm having trouble attaching custom taxonomies to a post (CPT) submitted via a frontend form. For some reason, whenever a new post is created, new fields in the wp_terms table (containing the IDs of ...
0
votes
1answer
625 views

All blog posts are not showing up

This post may already exists but I just missed it in how I searched for it. Here goes. I have recently changed my blog back to the Genesis Framework. I am using the Nameless child theme. These are my ...
0
votes
1answer
30 views

Odd behaviour for the update button when displaying a WP_List_Table

I am currently trying to add a WP_List_Table to a metabox in the edit page of a custom type. The code is currently class Post_Table extends WP_List_Table { public function __construct() ...
0
votes
1answer
48 views

Foreach in get_post_types to apply a different filter per post type

I have a class in my plugin with the following function: protected function get_post_types($output='names') { if (! is_array($post_types = get_post_types(array( 'show_ui' => true ), $output))) ...
1
vote
3answers
521 views

Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”

I am trying to display 3 post_thumbnails from a custom post type "portfolio" on my homepage template. So one from post 'A' , one from post 'B' and one from post 'C' The image from post A will be set ...
0
votes
1answer
30 views

Custom Post Type: Search Results - Template for no results

My custom-post-type is a Property Listing and on the Homepage there is a Search form. The Search Form works fine if there is a Property or Properties Matching the results. If there are no Properties ...
1
vote
2answers
6k views

How to create new category for custom post type?

I have create a custom post type named "jobs", and I want to create a set of category for that, ie like "PHP Jobs", "Python Jobs" etc. $args = array( 'labels' => $labels, 'public' => ...
1
vote
3answers
608 views

Unable to get wp_redirect() working after adding a CPT via the front end

I am attempting to learn PHP by creating a relatively simple application built on wordpress, it is a basic CRM and I've made decent progress but have been stuck on some of the finer points. I've been ...
-1
votes
1answer
21 views

Taxonomy listing issue - does not display how I would like

What I have is a: Taxonomy: menu_type Term: drink (parent term) Sub term: drink 1, drink 2 (child terms) Term: appetizer (parent term) Sub term: appetizer 1, appetizer 2 (child terms) I ...
0
votes
1answer
2k views

How to query posts by meta keys AND under specific category?

The scenary: I'm working in a review system for WordPress, a game review website. It uses default posts, that when under "review" category, shows the review's meta fields (from ACF plugin). It's ...
0
votes
1answer
428 views

Multiple wp_editor instances in custom post type using Ajax

In a custom metabox, I need to generate a tinny wysiwyg wp_editor everytime we click on a button.. I struggled a lot with this and couldn't achieve it. The js $.ajax({ url: ajaxurl, data: ...
0
votes
1answer
719 views

Change permalinks for custom post type based on taxonomy term

I have a custom post type 'profile'. Each profile can be one and only one of either student, staff or alumni, which is set through the 'profile_types' custom taxonomy. This gives me permalinks of: ...
0
votes
1answer
2k views

Use menus with anchors

I have a CPT archive page and I want to create a navigation menu which will jump to anchors in the form <a name="post-slug" http="{the permalink goes here}>The CPT Title</a> I have been ...
0
votes
0answers
13 views

How to add custom meta box to Quick Edit?

I have custom post type imggal. I want to add custom meta box imggallink to quick edit and can't find any right info for it. How to get it? Help please. I try to add column function ...
0
votes
2answers
4k views

Single page not working for custom post type

I created a custom post type with the following code: add_action('init', 'create_trans_career'); function create_trans_career() { //Arguments to create post type. $args = array( ...
1
vote
2answers
2k 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 ...
-3
votes
0answers
32 views

How to display custom post type post_meta [duplicate]

How can I display my custom post types with their post meta field date of birth, where date of birth matches today's date or current date? $query_args = array ( 'post_type' => ...
-1
votes
0answers
53 views

Query between dates using ACF Date Picker fields

$query_args = array ( 'post_type' => taxonomy, 'post_status' => "publish", "order" => "ASC", "meta_query" => array( "relation" => "OR", array( ...
0
votes
1answer
17 views

Adding `supports` array to WordPress custom post type

I am trying to add the supports parameter to my custom post type but it is not working and renders the editing page blank: add_action( 'init', 'create_post_type' ); function create_post_type() { ...
0
votes
0answers
11 views

Storing a many to many post type relationship in post meta and keeping SQL ability for Joins

I have 2 Custom Post types and i am manually keeping a relation between them in a many to many relationship by keeping an array as a custom field. All PARENT post types have ONE filed in wp_postmeta ...
-1
votes
0answers
3 views

Membershp plugin for custom post type [on hold]

I have a custom post type called makeup-artist as you can see here: http://makeuptalent.com/makeup-artist/lets-face-it-beauty/. I want the ability to sell access so that makeup artists can submit ...
0
votes
1answer
510 views

Create action running on trashed_post hook to modify post_meta value

I have a custom post type that always do math operation to its post_meta and other custom post type post_meta. For example: post-type 1 = cpt_product_order post-type 1 post_meta = ...
0
votes
2answers
21 views

Style post formats differently only in single

I want to use post types to style video posts differently. This should be quite easily achieved with custom post types. But I only want the video post type to affect the post when it is in "single". ...
0
votes
1answer
17 views

Display subcategories in the filter on CPT

I have a little problem with my CPT. I created some categories with subcategories, and I wish display the subcategories in the select filter. Actually, the categories filter display only the first ...
0
votes
1answer
22 views

Option page's form doesn't work

I have two option pages: General Options > MyOptionPage1 and CustomPostType > MyOptionPage2 Both have a form, but the after clicking Save in second option page I land in the 404 page. Here is ...