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

learn more… | top users | synonyms (1)

0
votes
1answer
15 views

Custom post types sorting admin columns nothing found

the code below makes it possible to sort after appointment_start_date column, but if I click on header of the column all appointments disappears (Msg: No Appointments Found). Here is the code: ...
5
votes
1answer
99 views

Multiple custom post types under one admin menu

I'm not sure where to start with this one. I want to have 4 custom post types (Gigs, Venues, Holidays and Potentials) listed under a main heading of Events Manager, but don't want Events Manager to ...
0
votes
1answer
47 views

Meta box not saving

I am following Noel Tock's tutorial on making an Events CPT and so far I was able to show the custom columns and the custom meta box. The problem now is that I cannot save the data inside the meta ...
0
votes
0answers
22 views

Can not be able to insert the custom post taxonomy

here is my code in which i can't get insert the term in custom post type taxonomy .as in the the code in wp_insert_term($term,$taxonomy,$args); cannot work , while it is working if i put a string ...
0
votes
1answer
18 views

Why does accessing url by category cause issues with post types?

I just built a site with a few CPTs (apple, banana, cucumber). My boss wanted to split them out into categories (red, yellow, green) and link to the category pages. As soon as we did and accessed the ...
0
votes
0answers
28 views

Custom Post Type Re Write not working

I am trying to get my custom post type single.php URL to have the category in it. I am using the default wordpress categories (I didn't register a custom tax.). My current URL (from the base) looks ...
0
votes
1answer
18 views

Add custom columns in custom post type browse page

I made a plugin which adds a "member" custom post type. I customized the edit view (with the editor hook) to get only the fields I want and store them in the database. I have fields like "name, ...
0
votes
1answer
26 views

Best approach to allow front-end display of posts’ reviewers?

My first question here; please forgive any protocol lapses. I manage an academic journal that publishes on Wordpress. We use Co-Authors Plus to allow collaborative articles. Each article also has two ...
1
vote
1answer
28 views

No posts found - Custom Post Type show_ui

I am fairly new to Wordpress (but been on the PHP circuit for a minute) and developing a plugin. I have created a custom post type with the following: function create_post_type() { $result = ...
2
votes
0answers
19 views

Select menu should display categories and the item's depth

I have a select menu of a custom post type in the header.php: <?php $selectloop = new WP_Query( array( 'post_type' => 'products', 'posts_per_page' => -1 ) ); echo '<form>&...
0
votes
1answer
8 views

Compare meta_values and return results that are similar

I have a Custom Post Type for Properties and on the Single Property Page there is a sidebar that I want to show similar Properties in. I have managed to show Properties with the same terms but I ...
1
vote
1answer
37 views

delete custom post based on custom field date

RESOLVED ## updated code below. I had created custom post type called 'esitykset' and I wanted to delete them if they are older that the date in 'show_date' custom field of the post. So I tried the ...
0
votes
1answer
48 views

Sorting custom post type columns with external data and without meta values

I created a custom post type 'Book', for which data is stored in an external database (like ISBN, author etc). The WordPress database contains the ISBN per custom post, which connects the correct data ...
0
votes
0answers
36 views

Custom Permalink Structure: /%custom-taxonomy%/%post-name%/

I would walk to the moon and back to get to the following answer. I've searched the internet for hours but couldn't find how to fix the following. I've created a custom post type and a custom ...
0
votes
1answer
26 views

CPT with its own category and tag url

I am developing a wordpress site where multiple CPT will used for top level segregation. Each CPT must have its won category and tag base. Also thew should have their own URLS to display only related ...
0
votes
1answer
20 views

Query pulling all taxonomies, not one I am specifying

I am trying to grab one random post from a custom Post Type I have that has a taxonomy that I give to it. For some reason it is pulling any post, no matter the category. Here is my Post Type if (!...
4
votes
1answer
56 views

I have a CPT that have menu_order enabled, how can I make the menu_order values unique so it won't have duplicates

I have a CPT named homeslider. I have menu_order page-attribute enabled, how can I make the menu_order values unique so it won't have duplicates when assigning values to it?
0
votes
1answer
31 views

Custom Post Type Category On Admin

I've created custom post type called 'video' and added category support. The problem is when i go to category of custom post type, it shows normal post's categories as well. I wanna seperate them ...
0
votes
1answer
29 views

Show first posts with custom field not empty and order all by title

I have a custom post type called "products". My goal is to make my custom query that I have on homepage and also the search query show first the posts that have a custom field called "id_number" not ...
1
vote
1answer
39 views

Building a Treatments Page, What Do I Use?

I am currently building a site for a local day spa and I have hit a dead end in regards to the treatments page. I just don't know what I'm doing, I have been stuck on this problem for a couple of ...
0
votes
0answers
22 views

Duplicate Custom Posts

I am having trouble with a site duplicating posts. It will duplicate "page 2" on "page 3" and it will duplicate one other specific post. It also isn't showing all the posts, but I think this has to do ...
0
votes
0answers
42 views

Query breaking with 'posts_per_page' => -1

I'm trying to return all posts for a category associated with a custom post type. I have the following query: $cat_name = single_cat_title('', FALSE); $termObj = get_term_by('name', $cat_name, '...
0
votes
0answers
15 views

Tax Query not generating correct query [duplicate]

I have the following query setup to pull videos from a custom post type by category: $cat_name = single_cat_title('', FALSE); $videos = new WP_Query(array( 'post_type' => 'video', '...
7
votes
1answer
91 views

Development of a Wordpress Search Plugin - Best Practices

Searching for around two days to find an answer to my question, I finally registered for this StackExchange. :) My Question is not simple, so I need to start at the very beginning. But to give you an ...
0
votes
0answers
16 views

Rewrite Rules in Custom taxanomy and custom post type

Problem in hand : I have custom categories in wordpress named "Product Categories" with custom post type "Products". i want to change urls from somesite.com/product/airconditioner/voltas/...
0
votes
1answer
17 views

User schedule a post?

Is it possible for a user (not admin) to schedule a post? Let's say they have a form where they can put in some text and use a date picker to select a date for the post to be published, how would that ...
0
votes
2answers
27 views

Custom fields not showing in custom post type

I'm putting together a basic landing page http://shurity.com/, and in trying to clean up my code, I wanted to replace some static content with dynamic content for the user. The element in question ...
0
votes
2answers
34 views

Create Custom Post type that uses Page.php template

I am creating a plugin that registers a custom post type, and I want it to be displayed using the theme's page.php template, rather than the post.php. I set the hierarchical flag when I register it, ...
0
votes
0answers
25 views

Customizing a category archive page through plugin

I have created a plugin that adds a custom post type called "Activities". This post type's archive shows all the categories, and then the categories each have a page that includes the posts contained ...
-1
votes
1answer
33 views

Get all terms assigned to a post from different taxonomies

There are different taxonomies. I have assigned different tags from these taxonomies to different posts. Can anyone help me to get all the terms which are assigned to a post. (Different terms from ...
0
votes
1answer
36 views

How to Duplicate (multiple meta box)?

I've made a meta box field which works nice, but now i need to add one more. For the past few hours I've tried to mix every piece of it, to duplicate it, take some parts, google, search, and no luck. ...
0
votes
0answers
24 views

Terms showing empty inside a loop

I have the following problem: I have 2 taxonomies that belongs to a custom post type What i want to do: Loop = taxonomy 1 loop = taxonomy 2 loop = post type My code works but, it shows ...
0
votes
0answers
12 views

Is this the correct way to use Custom Post Types & Taxonomies

I need to create a Members directory and each member serves a selection of area codes. I plan to create a Custom Post Type called Members and a Taxonomy in the style of tags called Area Codes. Does ...
0
votes
1answer
86 views

How to Submit Post Via cURL & PHP

Thanks for reading. I'm trying to submit a post via PHP. I'm filling in a large number of posts from a good amount of data I've scraped so I need this to be automated. I don't have the time (or ...
0
votes
2answers
51 views

How to quickly reorder posts in the admin panel that will persist for the wp-api

I generally use the Intuitive Custom Post Order plugin for any WordPress sites I work with so clients can order their posts visually. For this project, I'm using WordPress as an admin panel and ...
1
vote
1answer
32 views

Is it possible to place custom post type files inside a folder in theme directory?

I have created a custom post type called customtype. From my understanding the template file for it would be single-customtype.php which is placed inside wp-content/themes/mytheme. Can I place the ...
0
votes
0answers
15 views

custom post type remove adminbar edit link

I am trying without success to remove the edit page link on the wp admin bar for a custom post type when a user doesn't have the capability to edit_others_pages. function remove_admin_bar_edit_link()...
0
votes
0answers
29 views

Author archive only for custom post type

I want to create an author archive for only custom post type. This page will includes only custom posts by the author. And url structure should be example.com/portfolio/author/author-name/ I don't ...
0
votes
0answers
22 views

Query returning 1 post per page but saying it has 71 pages with almost 1500 results in total

Something is definitely not right here and I honestly cannot understand what it it. After I put this code on one of my custom made plugins, although it makes the search correctly (the result ...
0
votes
1answer
59 views

Custom post WP_Query infinite loop error

I am trying to build wp_query loop with custom post type and it seems I get the infinite loop as the result. Here is my code that I am using: $apartargs = array ( 'post_type' => 'apartmani', ...
3
votes
1answer
64 views

$query->set in pre_get_posts is unintentionally affecting the backend

So, I have a custom post type, 'properties'. I'm using archive-properties.php, and need to set some parameters on the $query. I don't want to use new WP_Query since I ran into some issues where a ...
0
votes
0answers
24 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
20 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
14 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
1answer
54 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( ...
0
votes
2answers
57 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
0answers
15 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": [ ...
2
votes
1answer
37 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 --...
1
vote
0answers
19 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 ...
1
vote
0answers
39 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 ...