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

learn more… | top users | synonyms (1)

1
vote
1answer
26 views

Custom post type 'orderby' => 'meta_value' not working

I have a custom post type called Member I have added code to my functions.php file to add a couple of custom column headings (which is working) for First and Last name and Member Type but I can't get ...
0
votes
0answers
15 views

Terms showing up in object cache on unrelated pages

This is perplexing. I'm running Debug Bar on my dev site. I noticed today that the object cache reporting shows memory taken up by terms I've created using register_taxonomy when not on pages ...
0
votes
2answers
36 views

How can we disable a custom post type archive page but enable its feed?

To disable a custom post types archive page, we should use the following code: $args = array( 'has_archive' => false, ); But when we use false for has_archive, the feeds page (like : ...
0
votes
2answers
40 views

Query posts between two dates (custom meta keys) CMB2

I have a custom post type (projects) which have custom cmb2 meta keys (str_dte and end_dte), so each project has a start date and end date. What I am trying to do is to get projects between two dates. ...
1
vote
0answers
18 views

Custom Taxonomy and tax_query Issue?

I am working on Plugin development and my plugin name is plugindev.I have a custom post type called team.I have a custom taxonomy Team_Category which is being registered by this code ...
1
vote
1answer
19 views

Child page in custom post throws 404 page not found

Currently I am trying to add a page as a child in my custom post section. The parent pages in my custom posts works correctly, I've set a template file for them as singe-custom_post_name.php. All ...
1
vote
0answers
18 views

Prioritize posts in query by meta keys?

I have a CPT called jobs. In my single jobs page I am counting page views with these functions: /********* Post Views counter ***********/ remove_action( 'wp_head', ...
1
vote
2answers
32 views

Create 2 Post Types, one parent to another in Plugin

I created a custom post type "Book", and successfully added to WordPress' admin menu as a root category. I can successfully list the post type contents with /wp-admin/edit.php?post_type=test_book ...
1
vote
1answer
48 views

single-{cpt}.php ignored

I've created a plugin that registers a custom post type named evento_type: register_post_type( 'evento_type', ... The CPT archive page is archive-evento_type.php and it is saved in the root ...
1
vote
2answers
27 views

Remove base slug in CPT & CT, use CT in permalink

I've come quite far, but can't manage to get this to work. I'd like to remove the base slug from my Custom Post Type review and my Custom Taxonomy brand. The final result should be a URL like this: ...
1
vote
1answer
18 views

REST API: How can I restrict a custom post type to only be accessible by authenticated users?

I have a custom post type configured to be accessible via the WP Rest API v2. How do I lock the access to this custom post type so that only the authenticated users can perform GET requests?
1
vote
0answers
12 views

Homepage's content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?

I have a custom field in my home page called "Featured posts". There are two fields: title and post. The post field returns post_object with post_type as posts. In my functions.php I have added the ...
0
votes
0answers
25 views

Query Custom Post Type that doesn't have a specific Custom Taxonomy [duplicate]

I have a CPT 'catalog' and a custom taxonomy 'catalog_category' attached to it. I need to query for all 'catalog' items, that don't have any values of 'catalog_category' selected. These arguments ...
1
vote
0answers
18 views

Show Custom Post Type meta boxes only on Page Edit

I've went through the laborious process of creating the CPT. I see it on the sidebar of my WP install, I can add new, save data, and on frontend I can output the data. Is it possible with WP to move ...
-2
votes
0answers
21 views

Create Child Post of Parent Post [closed]

I want to create and show a custom post type. With a parent post and with a few child posts as well. How can I do this? Any help appreciated, thanks!
1
vote
0answers
18 views

Lists Posts from CPT that match the Title of the Page

I am trying to get all the posts associated with the Title of a page. This is what I currently have: <?php $title_to_tag_posts_query = new WP_Query( array( 'tag' => ...
0
votes
0answers
23 views

Using esc_html for textarea inputs

I am using the following code for a variety of input fields, building a CPT for a theme: function display_meta_box_from_cpt <input type="text" size="80" name="imgurl" ...
4
votes
1answer
45 views

Get URL for specific post type and current tag

I have a number of custom post types as well as a custom taxonomy. I created an archive page for the taxonomy which lists each connected post, so all good there. What I would like to achieve is the ...
1
vote
1answer
33 views

Custom role capabilities to administrator not taking effect (no plugin)

I have created a custom post type from a plugin. I added a capability type teacher. Then I have added custom capabilities to administrator. But the problem is for the first time after completing this ...
1
vote
0answers
23 views

How to show custom taxonomy in the permalink?

I used the Portfolio Post Type Plugin to create custom tax and post type. I would like to show the custom taxonomy on the portfolio projects. portfolio/customtaxonomy/project while now is ...
1
vote
0answers
15 views

Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)

As title reads, I am trying to list specific custom tax's terms in a custom post type archive's page. My setup: Custom post type: 'podcast' Custom Taxonomy: 'showname' -> Custom Field for above ...
1
vote
0answers
15 views

How to get updated data when save_post triggers?

I am running a function to do some stuff when save_post triggers to use new data. However, the $post object it returns, contains old data of the post, not new data! How can I get new post data inside ...
4
votes
2answers
100 views

Change capability type of post type registered by plugin

I'm using the plugin Custom CSS JS which registers it's own post type but the capability is assigned to "post". I want to change it to "manage_options". Is there a correct way without altering the ...
1
vote
0answers
20 views

Custom Post Type Archive Error, Takes Last Post as Title and Doesn't Work

I have a cpt called Videos that suddenly doesn't work. In the archive page only appears the last video. The archive-title is not Videos anymore, it is Archive, while the browser title is the last ...
-1
votes
0answers
17 views

Where can I find tutorials showing me how to build an advanced search panel for custom posts?

I am using Custom Post Types UI and the ACF plugin to create some custom posts with associated fields. These custom post type is 'programs' and they are about offering online courses. Anyway, I am ...
1
vote
1answer
24 views

If post has custom field then display css-class

I would like to display a different icon in an i tag if a post has a certain key of a customized field. In my example Preis: <i class="(get_post_meta(get_the_ID(), 'Preis', true) != '' ? echo "fa ...
1
vote
1answer
25 views

Meta Key Value in current-user-only loop

I created a loop for logged-in-users-only which works perfectly for all data except for meta keys. I'd like to be able to also extract meta keys but had no luck so far. This is my loop (based on this ...
0
votes
1answer
43 views

Add search to 'Parent' dropdown

I created a product catalog from custom post type pages. I used it's hierarchy to make menus and submenus. It looked like a great idea at a time... But now this catalog grew in size and it's very ...
0
votes
0answers
55 views

Need help with a foreach loop with custom post type and taxonomy

I am looking for help with a foreach loop for taxonomy inside of a custom post type. Please note, my php skills are poor. The goal is to have a custom post type (CPT) called retail location that has ...
0
votes
0answers
19 views

Create column in custom post table based on custom taxonomy

I am trying to add a column to the custom post list based on custom taxonomy. I have a custom post type called product. I have a custom taxonomy called cheese and within that taxonomy I have terms ...
1
vote
0answers
19 views

'Pages' widget alternative for custom post types?

I want to make a menu from hierarchical custom post type. There is a default WordPress widget called 'Pages' that give you list of all the pages preserving their hierarchy. Is the a way to use this ...
0
votes
0answers
19 views

Custom Post Type (CPT) list/archive/category setup help

I've added a CPT: "projects". I'd like to be able to land on /projects and have a list of my categories. When clicking on a category it would bring you to /projects/category-name. That page would ...
1
vote
0answers
22 views

Adding the_content() in custom template email

Let my explain the scenario first: I have a very custom page template. That is use in combination with a CPT and a few Custom fields. The CPT is called "werklijsten" (it's in dutch so bare with me) ...
0
votes
0answers
23 views

How to display a list of CPT posts but only include posts with an empty custom field value

I have a large amount of CPT posts (500+) and need to be able to create a list that only shows posts that has an empty value in a specific custom field. I've been browsing somewhat similar questions, ...
0
votes
2answers
25 views

using the_permalink to echo an href into a <li>

I'm trying to make a menu that automatically populates from a custom post type I have and I'm having some trouble getting it right If someone could point me in the right direction I would greatly ...
0
votes
0answers
9 views

Prevent non-admin to deattache media

We use Woothemes Sensei plugin as our Learning Management System. We also use Sensei Media Attachments plugin, in order to attach PDFs to our lessons CPT. Well, from time to time some PDFs are being ...
1
vote
1answer
22 views

How can the recipients and content for comment email notifications on a custom post type be changed?

I am building a ticket system and would like to use the comment threads as the discussion for the ticket. There are three users involved in each ticket: The client. The support operator. The support ...
1
vote
1answer
39 views

How to display all posts from standard posts to custom post types in a loop with pagination?

I have several standard posts and posts from a custom posts type. Now I want to display all of them on my home page using a loop. My problem is that it displays the posts including the posts from the ...
2
votes
2answers
59 views

How to set a custom post type post as static front page?

I am writing my custom theme from scratch and I have a custom post type 'my_frontpage' and want to declare one of it's posts as front-page. I want to do this via admin, hence simply add my cpt to the ...
1
vote
0answers
24 views

Meta Query posts not showing on ending date of custom field

I feel like my logic is off, but the short version is I have 2 custom fields spitting out unformated times for event-start-date and event-end-date. I don't want to show a post if the start-date is not ...
1
vote
1answer
72 views

wp_insert_term in a multisite installation

i am creating a theme that creates pages and sets some meta values and ext on theme activation. Everything works great but... I need to insert some terms to misc cpt's in a multisite installation. ...
0
votes
1answer
17 views

DIVs not showing correctly on CPT?

I've been trying to figure out a little problem since yesterday. I made a CPT that is supposed to be posts that are styled and use the same template as regular posts in wordpress. When I bring up ...
0
votes
0answers
10 views

adding multiple images to a post from a csv file [closed]

I have a csv file that I'm importing vehicle info for a dealership. I'm not sure which wordpress theme I will settle on so I'm experimenting with a few that I like. I'm importing each vehicle in ...
0
votes
0answers
10 views

Pulling custom post type into a form

I'm trying to make an order form where products can be added by my client using the WordPress backend. It's a non standard form so Gravity or Ninja forms will sadly not do the trick. (needs a modal ...
1
vote
1answer
20 views

Push metadata in array

Applying meta keys in search result Since I need to take on a different approach to get my data in javascript from wordpress, I am trying to apply (as follow up on my post earlier today ...
0
votes
1answer
34 views

How to hide editor, but keep media library access

How do I hide the editor from a custom post type, but retain the ability to access the media library? I have registered a custom post type and created a meta box for it that allows users to upload ...
0
votes
0answers
19 views

Change wordpress url permalink structure to show authors posts

Is there a function that change the whole wordpress permalinks structure?, I need the following pattern: domain.com/author/custom-post-type/post I've tried a few but nothing seems to work.
-1
votes
0answers
11 views

How do I create a resource page/portal for a custom taxonomy with related CPT's all showing in tabs or sections?

I want to create a custom dynamic page combining all different types of information related to each term in the custom taxonomy, either in different tabs or sections. So for each term that page is ...
0
votes
0answers
24 views

Custom Tax Query with special characters

I have this query that pulls posts form multiple custom taxonomies. IT works 98% of the time, the only time I have problems is when the term name has an apostraphe or special character, is there ...
0
votes
4answers
49 views

Search one custom post type ONLY, disable “all posts”

I have the searchform.php set up to search a custom post type and a category. So far so good. However, a savvy user could edit the URL to remove "post_type=film" and search all pages and posts. I ...