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

learn more… | top users | synonyms (1)

3
votes
0answers
38 views

Custom Posttype Inheritance (and url structure)

After looking at documentation and searching around, I haven't been able to find anything, so here goes: Are there any way of custom-post-type-inheritance, and an url structure like this: ...
2
votes
0answers
14 views

Custom Taxonomy's Label to change the text appearing in Appearance > Menu

I have three custom post types, each has its own taxonomy like product_cat, event_cat, media_cat. I labeled all of them with the word "Category" like: register_taxonomy("product_cat", "product", ...
2
votes
0answers
151 views

Custom Post Type Settings page, choose page to display archive

So, I followed the accepted answer of this post Possible to add another setting to 'Front page displays' setting for Custom Post Type but didn't entirely work, had to compare against the ...
2
votes
0answers
129 views

Allowing custom role access to custom post type in back end

So I'm having some issues with this and I can't see why. I just need a custom role that can access the blog in the back end. I've added a new post type with a Capability type of blog and a new user ...
2
votes
0answers
129 views

Storing revisions of metadata for custom post type

Storing metadata for custom post types is easy, you just need to add an action for 'save_post' with your method that handles this. In which you have then something like the following for a field that ...
2
votes
0answers
306 views

Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar

I have 8 custom post types (which are actually for 8 different blogs and used as "blog landing pages"). Each custom post type is also a Blog Category and each has several sub categories to it. For ...
2
votes
0answers
422 views

Fetching private posts or custom post types via WP-API with basic authentication

I've installed WP-API along with Basic Auth. I'm able to fetch cpt posts using curl http://siteurl.com/posts?type={post-type} However, if I change a post to private, it is no longer returned. This ...
2
votes
0answers
206 views

How to Combine Two Custom Post Types into Single Permalink Structure

The website uses - A) A hierarcical Custom Post Type "Destination" to support the following structure, so each tier of the hierarchy could have its own unique destination guide: Territory - ...
2
votes
0answers
414 views

Display a query with multiple post types and same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback in Wordpress. I have two custom post types called "Clients" and "Projects" and they each pull information ...
2
votes
0answers
551 views

Custom media upload content for inserting custom post shortcode

I’m working on a plugin that creates custom post type “portfolio” along with shortcode to insert in any page or post. The shortcode is: [portfolio option1=“1” option2=“0” option3=“1” ] And it works ...
2
votes
0answers
276 views

Inconsistent temporary 404s on whole install | PHP error with post-template.php

I'm deeply confused by this one: I have a WordPress install on a Media Temple GS [one of many which work fine and are configured almost exactly the same] which is occasionally giving me 404s sitewide. ...
2
votes
0answers
215 views

How to remove slug from hierarchical custom types in 3.5.2

I know that is not suggested and that there is lots of discussion about this argument out there. Unfortunally, after a week of trying and tests, I have not managed to remove the slug from my custom ...
2
votes
0answers
2k views

query_posts with a custom post type, a meta_query and sorting by post date?

I've searched the archives and found questions similar to what I need, but haven't found exactly what I want. I've got a bunch of products that are sorted by a meta_key of country, and I'd like to be ...
2
votes
0answers
599 views

Hierarchical Custom Posts - Highlighting Current Post in Sub-Menu

I have created a hierarchical custom post type called events and have used wp_list_pages to list the sub-posts for each event post (See below). This navigation works great, but I cannot figure out how ...
1
vote
0answers
17 views

Best method to make posts searchable, sortable and filterable - custom field, tag or category?

I'm wanting to create/modify either the existing post type, or create a new post type to be searchable, sortable and filterable by the following fields: Country from: Country to: Activity: ...
1
vote
0answers
17 views

First custom field value (out of several) displayed twice after query

I have the following piece of code, which is based on the solution to this question: <?php $game_titles = get_terms('game'); foreach($game_titles as $game_title) { ...
1
vote
0answers
26 views

Show custom post type inside a custom post type

I am kind'a new to wordpress and i need some help. I am building a website that contains articles. in each article page i want to show the writer details(image name and short description). I have ...
1
vote
0answers
13 views

A form that can save/edit after first input

I need a form on my WordPress website that users can input information into through dropdown fields.But i just dont want the information to go away after sending.I need them to still be able to come ...
1
vote
0answers
34 views

wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query

I'm implementing a form for a frontend post with a shortcode. The form is processed in the same function, reloading the page: function adicionar_ninhada(){ $user_id = get_current_user_id(); if ...
1
vote
0answers
21 views

Custom while loop for hierarchical display of a taxonomy

I'm trying to build an automated mega menu that loops through all product-category terms and displays them in a hierarchical underscored list, as well as including post in each term. For example, ...
1
vote
0answers
10 views

Removed custom post type slug but not working for child pages

There are many discussions going about to handle child pages for custom post types were the custom post type slug has been removed. This results into an 404 because Wordpress can't match a valid ...
1
vote
0answers
16 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 ...
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
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
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 ...
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 ...
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' => ...
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 ...
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
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 ...
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) ...
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
0answers
12 views

Get the taxonomy of a post hierarchically

I would like to get all the taxonomy of one post (in a loop), hierarchically. Example I have those taxonomies, and the ID of the tax in bracket. Tax1(1) -Tax2(3) --Tax3(2) I would like to gather ...
1
vote
0answers
24 views

Creating a Page Template to display all items from a Custom Post Type

To begin with I should note that I'm fairly new to both php and editing in the WordPress-files, BUT I have actually managed to succesfully create a page template that puts out a list of all items in a ...
1
vote
0answers
23 views

What is best way to prevent access to Custom Post Types unless authenticated when the post type has an archive and is publicly queryable?

What is best way to prevent access to Custom Post Types unless authenticated when the post type has an archive and is publicly_queryable? Is code below enough to keep the content secure and prevent ...
1
vote
0answers
43 views

Cannot Create new Post within Custom Post Type

I have a custom post type registered and when registering I am using... if( !post_type_exists( 'email_template' ) ) { register_post_type( 'email_template', array( ...
1
vote
0answers
22 views

non-hierarchical post type with hierarchical url structure

I want the url for my custom post type to be like : "example.com/parent-custom-post/child-custom-post/grandchild-custom-post/" without setting the hierarchical(for custom post type) to true. I heard ...
1
vote
0answers
8 views

Custom post type template but

I'm looking for the right way to create a template that would render a single instance of my custom post-type. The trick is that this post type should not be reachable directly (I mean a single item ...
1
vote
0answers
21 views

Adding custom taxonomy in same menu place with two custom post types

I have registered 2 post types: register_post_type( 'post_type1' , $args1 ); register_post_type( 'post_type2' , $args2 ); And I've registered a custom taxonomy associated with the second post type: ...
1
vote
0answers
59 views

How to make custom taxonomy into drop down select in a custom metabox

I have a custom post type that I am creating custom meta boxes for on the "Add New Post" screen. I would like to remove the default meta boxes for a given custom taxonomy and place it in a drop down ...
1
vote
0answers
31 views

Multiple pages for posts?

maybe this is answered somewhere just i am not able to find it then sorry. Situation is that I need to have different "page for posts" for hierarchical post types. example: CTP: office ...
1
vote
0answers
26 views

Including taxonomy term before post type breaks top level pages

Got a website that has two top level pages called commercial and domestic, and in these pages there is other content that shares a similar format, e.g. I want case studies in both the commercial and ...
1
vote
0answers
11 views

custom post type and non-standard gallery

I've got an issue - ive created a cpt with below code: <?php // Register Custom Post type $portfolio = new CPT('portfolio', array( 'supports' => array('title','editor','thumbnail'), ...
1
vote
0answers
34 views

Using pre_get_posts to Filter Posts

I'm trying to filter archive_research.php to show only the research with status=current. In functions.php: add_action( 'pre_get_posts', 'only_current' ); function only_current( $query ) { if ( ...
1
vote
0answers
19 views

Adding Page Templates to post but it ignored it

I follow the post to add the template metabox to a custom post type's editor, but it doesn't work. When I visit the post, it shows "NOT FOUND ANY POST" which looks like index.php or single.php ...
1
vote
0answers
19 views

Allow user to only access custom post type

I am starting to get comfortable with Custom Post Types, but I don´t get the capabilities for them right. I have something like this: // define capabilities... $capabilities_werden = array( ...
1
vote
0answers
25 views

How to use Custom Page Templates for hierarchical Custom Post Type

I added custom post type to my website. function any_posttype() { register_post_type( 'any', array( 'labels' => array( 'name' => __( 'Any' ...
1
vote
0answers
93 views

Filtering posts list table

My post_type is 'part'. I created a custom field 'Images' this way (simply added new columns to the array): add_filter( 'manage_edit-part_columns', 'my_columns_filter' ); function my_columns_filter( ...