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

learn more… | top users | synonyms (1)

0
votes
0answers
25 views

Gravity Forms: retrieve custom taxonomy

I'm looking for a way to retrieve a custom taxonomy entry for a custom post type, for admin notification. Essentially, the same form is available for every custom post, but each post has specified ...
0
votes
1answer
63 views

Creating a simple pagination for custom post type templates

I have custom post post type call 'news' and I am struggling to get it to paginate correctly. I'm looking for a simple prev and next links, not worried about page numbers in the middle. In ...
1
vote
2answers
30 views

Custom post status not working

I'm trying to create two custom post status'. I used the Codex to generate the code and that didn't work. Then I went to http://generatewp.com/post-status and it didn't work either. It isn't showing ...
0
votes
1answer
25 views

Wordpress as a frontend website for iOS app [closed]

I am developing a product for a local gym. The product comes in 2 parts : - a smartphone app used by the client - a website used by the coach The coach uses the website to prepare the workout. So ...
0
votes
1answer
1k views

Use WordPresss 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 ...
3
votes
2answers
594 views

Create permalink structure for one taxonomy archive per custom post type

So, I've been going crazy trying to figure this out. Essentially, I've created two custom post types, 'the_case_study' and 'the_video', with respective slugs 'case-studies' and 'videos'. I've also ...
0
votes
1answer
495 views

Taxonomy rewrite pagination 404

I have rewritten my taxonomy url to the name of my posts type 'filter'. Because I have done this, my pagination does not work anymore on the url: http://www.website.com/filter/term-name/ So if I ...
0
votes
0answers
36 views

Save multiple custom post fields from quick edit

Context: A multiple custom posts and custom fields website. Since the website is rather complex, has a lot of users, a lot of editors and a lot of data, they asked to be able to choose which custom ...
1
vote
2answers
647 views

Wordpress 3.5 Media Uploader - Only allow 1 upload and certain file types

I am trying to include the new WP Media Uploader in a Custom Meta Box. I found this tutorial: http://codestag.com/how-to-use-wordpress-3-5-media-uploader-in-theme-options/ However i am looking for ...
2
votes
1answer
381 views

Programmatically adding posts

I'm about to create parser which would be inserting new custom posts. So, it's pretty simple global $user_ID; $new_post = array( 'post_title' => 'My New Post', 'post_content' => 'Lorem ...
0
votes
1answer
283 views

How to add a post counter to the list of custom taxonomy terms?

I am using the below code to display the list (radio buttons) of terms that are currently used by existing custom post type posts: $args = array( 'taxonomy' => 'typ', 'post_type' => ...
0
votes
1answer
21 views

Custom Post Types and Pre Populated Custom Taxonomies

I'm building a custom post type that relies on three custom taxonomies. I'm registering all the custom posts and tax... using the init action (this works and I can manage the new aspects) ... ...
0
votes
1answer
314 views

Warning after create Custom post type with Roots theme

I've created e Custom post type with Roots theme, adding the custom script inside functions.php like require_once locate_template('/lib/custom-post-types.php'); // Custom post types After ...
8
votes
2answers
20k views

How to create a custom search for custom post type?

I have a search field for the blog posts, but I need an other for a custom post type. How can I create this custom search form with a different search result layout?
0
votes
1answer
301 views

SQL to update custom post taxonomies

I have a custom post "review". It uses the same categories and tags from default posts, so they share "category" and "tag" taxonomies. But later I changed the "review" register to have their own ...
1
vote
1answer
12 views

Archive filter disappears on no results?

I have been working through this example: http://www.advancedcustomfields.com/resources/creating-wp-archive-custom-field-filter/ That a colleague of mine found for creating a simple checkbox-based ...
0
votes
2answers
54 views

WordPress custom post type queries

I'm using custom post types and listing them in single-[customposttype].php?type=example <?php if (have_posts()) : while(have_posts()) : the_post();the_content(); endwhile; endif; ?> Now I ...
0
votes
1answer
522 views

Showing the custom taxonomy parent term and child term of a post

Is there any way that you can show a custom taxonomy's parent term and child of a post? I'm currently using get_the_term_list() to display the custom tax terms of the post. The only problem is the ...
0
votes
1answer
376 views

If tag exists, then echo once

I have the following code and I'm trying to check to see if a specific tag exists, and if so, I need to echo it once. The problem is when the tag exists in multiple places, it echos multiple times. ...
1
vote
3answers
26 views

Search tags in CPTs

I can't seem to figure out how to include tags in a wordpress search. For example, if I search for 'apple', I would like to get back posts with 'apple' in the title or the content (default wordpress ...
0
votes
1answer
502 views

WordPress import not importing custom taxonomy

I've posted this already in the WP Support Forum hoping to have more luck here. I'm trying to import a custom post type from one blog to another. (126 posts in the custom post type). I've exported ...
0
votes
1answer
806 views

Adding post_type to the query via pre_get_posts, with infinite scroll

I'm doing something wrong here. I'm trying to add a custom post type, external-videos, to the main blog query in all instances. It's working in the main blog page for the first load of posts but the ...
0
votes
3answers
463 views

Drag n Drop Post Order for multiple Custom Post Types

I have two custom post types (Branding Elements and Products) that I'm showing on a single page, and the client wants to be able to control the sort order of the page. What would be the best course ...
1
vote
2answers
66 views

Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname

I have a custom post type "news_updates" which I have not given custom tags or categories. I have however created a normal tag (not attached to a custom post type), and assigned it to a particular ...
1
vote
2answers
1k views

Include taxonomy slug in url?

I have the following custom post-type and custom taxonomy setup: add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'system', array( ...
1
vote
1answer
659 views

Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it

I'm trying to output a custom post type archive using a shortcode. Everything works fine except for the get_next_posts_link part. The weird part is that it's right next to a get_previous_posts_link ...
1
vote
1answer
58 views

Loading all files within a directory

I've made this little function which I'm wanting to call all the files within a directory. I don't think the glob() == false would work though. I'm new to this function so not aware of all ...
0
votes
1answer
41 views

Programmatically change post visibility on save_post action return a 500

I'm trying to change the post visibility for my custom post type. On the edit.php screen the user can use a custom field to set the post type to normal or extended. That field shall work as ...
0
votes
1answer
41 views

Render custom taxonomy query as single template

Im developing a "catalogue" plugin using a custom post type and a custom taxonomy. What I want now is to display the custom taxonomy as a single page. That means I if the taxonomy term "Popular Items" ...
0
votes
2answers
917 views

Saving Custom Post types and fields to a custom table

I have a project in which I am trying to import a large amount of data into a WordPress installation and from that data, create pages on my site (as a custom post type). Since these pages will be ...
2
votes
2answers
191 views

Add custom field to media attachment image attribute in post editor

I have the following filter, but do not know how to add custom attributes to image field, when attaching media to post. example <img data-ext-link-title="" data-ext-link-url=""> ...
2
votes
1answer
269 views

Custom post types and permalinks

I have a custom post type called Content, that has a capability type of 'page' and is set to 'hierarchical' => true. I have two pages with the same name "Children", but they have different parents. ...
0
votes
1answer
338 views

Set post to draft after set period based on post_modified date

I have a custom post type for the user profile page. My client wants all users to update their profile at least once a month, so we want their profile (custom post) to be automatically set to draft ...
1
vote
2answers
1k views

Importing posts in custom post type into new website

I have two wordpress installs. One in root directory and other in subdirectory of the same domain. I want to transfer posts of subdirectory into a custom post type of main site. Post of subdirectory ...
1
vote
2answers
1k views

I can't set meta_key in my custom post type query

I've created a custom post, events, and saved the meta data event_year to each event. I'm trying to get a year's event archive. When I go the the following URL, the meta_key and meta_value are not ...
0
votes
0answers
54 views

Access post_type from url inside media modal window

In the new post screen of a custom post type i.e. wp-admin/post-new.php?post_type=product you click add media button and it brings up the media modal. You can add custom functionality to thise via ...
2
votes
2answers
609 views

Set post title from two meta fields

In a custom post type I have post titles disabled, however in the list of posts and in the slug it just shows the title as "auto-draft". I want to automatically take two pieces of post-meta and make ...
0
votes
3answers
3k views

Remove admin menu for custom taxonomy attached to custom post type

I'm trying to create a taxonomy that is sort of hidden.. meaning i intend to adjust the metabox so that you can only select a unique term from 3 options. "featured","normal" or "excluded". but i ...
13
votes
7answers
7k views

Loading External Scripts in Admin but ONLY for a Specific Post Type?

So I continue to run into this issue and I just looking for the best and simplest solution to solve this problem. I have come to make use of custom post types in many different projects and have ...
0
votes
1answer
35 views

get_template_part for custom post type content not working

I have a custom post type of Textorial with necessary template files: textorial-type.php single-textorial.php content-textorial.php The idea is to have a custom layout for the post type and use ...
0
votes
3answers
30 views

Query & the_content() is showing in the header

This post is about two things: All the results of this query are posting to the header of the Page not on the content area as they should. Do you know of a solution as to why this is happening and ...
0
votes
3answers
293 views

Metabox does not show in custom post type

I am trying to create a metabox input field in a custom post type and it does not work even if I followed the instructions the best I could. I am not a PHP dev so I guess it could be just a small ...
1
vote
2answers
2k views

Custom Post Type, Saving Multiple Checkboxes

For a custom post type, I'm pulling in a list of another custom post types that I need to select for saving ... <input type="checkbox" name="32"> My CPT <br> <input type="checkbox" ...
0
votes
2answers
22 views

Custom Plugin - Query CPT - Display Results

This code is going into a sample Plugin I am creating as a test using CPT and print them to a Page. I have been trying to get print_r() to give me an object. The custom post types are posting - ...
33
votes
5answers
7k views

Where to put my code: plugin or functions.php?

Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php? There are many cases and many debates about that topic, mostly because there are ...
1
vote
1answer
363 views

Pre_get_posts Gives 404 on Custom Post Type

I'm trying to filter the query on a sub page called "Ask Question" to list all of the recent questions submitted by users, but I get a 404 when going to the page. Flushing the permalink structure did ...
1
vote
2answers
865 views

Display posts from Custom Post Type in category page on front-end

I created my Custom Post Type (bizdirectory), created a new post (Test Business) and created a new category (Business Directory). But if I add the Business Directory category (slug = business) to my ...
0
votes
0answers
25 views

Query posts from multiple post types sorted by overarching menu order

I have three different post types named activity, publication and project. I want all posts from these three post types to appear on one page on my website ordered by an overarching menu position. ...
0
votes
0answers
19 views

Pagination on Custom Post Types filtered Archive Page not working correctly (jumps to the first Post)

This is my Custom Post Type "newyork": add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'newyork', array( 'labels' => array( ...
0
votes
1answer
19 views

Use post in multiple places on a page with multiple posts

I have three custom post types: workouts, news_items, and business_items. I'm trying to display the top (most recent) item from each on the home page and I'm trying to put the featured picture from ...