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

learn more… | top users | synonyms (1)

1
vote
1answer
93 views

Can slugs from posts and custom post types conflict?

I have a system built on WordPress where we're using several custom post types, and I'm seeing some weird behaviour. For instance, I have a CPT called "Flyers", and I also have a CPT called ...
0
votes
0answers
195 views

Why the form's get method redirects to edit.php in wordpress admin?

I have a form in wordpress plugin and i am trying to submit it using the get method. The problem is that, the form redirects to edit.php page instead my custom post type page, which is ...
0
votes
1answer
315 views

automatically save custom post type title as a category

I wonder if there is a way to automatically create category from my custom post type titles. For example - if I create post named 'sport', the function will create a category - 'sport' automatically.
0
votes
1answer
227 views

Checking whether post is deleted or saved in edit_post

When deleting a custom post type, the function hooked to edit_post is fired. How can I check if the post is being deleted?
1
vote
2answers
472 views

Custom taxonomy template for multiple custom post types

I've registered a custom taxonomy for 3 custom post types to share, this all works fine. My issue at the moment is defining a conditional statement within the custom taxonomy file. I want this ...
0
votes
1answer
41 views

getting issue with custom advance fields plugin

I am using Magic Fields for custom fields. I am not able to retrieve data from my post type. I have this fields inside my post type: Now I have Page and Page template is releases.php Inside ...
0
votes
1answer
73 views

Show all post types in the same table of posts [duplicate]

I wonder if there is any way to show all post types in the same table of posts. Let's say I've got 3 different post types: Movies, Books and Videogames. Is there any way to show them all in a single ...
0
votes
0answers
66 views

Tax Query is only showing normal posts, not Custom Post types too?

This has been bugging me for the best part of a day now, so I'm appealing to help in order to calm my nerves. I run a site that has many custom post types. Every post type shares the use of the ...
0
votes
1answer
180 views

Resources to learn OOP for WordPress plugins, custom post types, etc

In a plugin, I need to create a custom post type and the associated admin menu modifications with a class rather than procedural code. What is the basic skeleton that I need to build off of in order ...
0
votes
0answers
52 views

WordPress Members Area Permalinks based on username

In a particular scenario I want a site with membership areas that give users their own member's "space". I want a permalink structure as such http://example.com/joebloggs and extend on that such as ...
0
votes
0answers
12 views

Similar to wp_editor but for the post title input field [duplicate]

What is the function that I can use to render the post title input field? I know wp_editor does that for the editor. I need to move the custom post title field (the default title that comes with the ...
0
votes
1answer
170 views

Cross post type parent page added parent page to permalink but give 404

I have made some custom post types with Magicfields. I need to set the parent page for a custom post type to a standard wordpress page. Figured that out with the help of this: ...
1
vote
1answer
46 views

List of Posts and Categories

I have a custom taxonomy of Species and a custom post type of Animals. I would like to display them in a tree view like so: All Animals Fish (taxonomy term) Shark (Custom Post Type) Sun Fish ...
0
votes
2answers
443 views

Assigning the same custom meta box to multiple post types

I currently have videos set up as a custom post type and I have also created a custom meta box for it that allows users to enter the ID of either a youtube/vimeo video - the video is then displayed on ...
0
votes
1answer
84 views

Return all wordpress custom posts in specific multidimensional array

How can I get all custom posts (post_type=family_guy) with their ID and all of their tags in multidimensional array? Here is exactly how I would like my array to look like: $array = array("1" => ...
0
votes
2answers
218 views

display all posts in current category

I am trying to display all the content/posts assigned to a certain category. I have a custom post type set up called 'Videos' and within this I have created categories called music, commercial, promo ...
-1
votes
1answer
48 views

Wordpress getting problem with pagination [duplicate]

I am trying to display pagination from archive.php with my custom post type news but when I click to Next page I am getting 404 page My Custom Post Type Code: function codex_custom_init() { ...
2
votes
1answer
603 views

WordPress Custom Post Type Category Page

I was hoping someone could help me. I have done some serious googling but cannot find the answer for this one. I have a custom post type called tutorials. I can go to mysite.com/tutorials and get a ...
0
votes
0answers
754 views

add_rewrite_rule and passing variables for custom post types

this is driving me crazy!! Scenario is... Custom post type let's call it "cpt_product" setup with the rewrite "products" Trying to use the add_rewrite_rule to create a friendly URL for meta details ...
0
votes
1answer
745 views

how can i show a google map in custom post type

i m making a plugin in which, custom type posts are used, for the Location Custom type, how can i show a Google map for any location. The Output will be shown as
0
votes
1answer
357 views

Hook onto Add New Category

When a user clicks the Add New Category for my custom post type of Packages I wish to create a new page with the same name as the new category at the same time. I can create a new page through code ...
0
votes
1answer
424 views

Cannot Save MetaBox Data in Custom Post Type

I've been working on this issue for quite a while and am truly stumped. Below is all of the code for my custom post type: /* Services Post Type */ function services_post_type() { $labels = array( ...
-1
votes
1answer
50 views

How to change order of custom post types. I want Featured post to come first

Used this but not working: $my_query = new WP_Query( array( 'post_type' => 'businesslistings', 'post_status' => 'publish', 'orderby' => get_query_var('orderby'), // ...
0
votes
0answers
346 views

WordPress Custom Post Type Pagination for Taxonomy giving 404

I'm developing a custom post type-based site on WordPress and have run into trouble on pagination - but only specific pagination. The custom post type has two taxonomies, pagination for these ...
1
vote
3answers
544 views

Flush Rewrite Rules when new site is created on network

I am working with a multisite setup and I have created some custom post types, which seem to work fine except when trying to view any of the post types pages on the front end, I get a white screen. ...
0
votes
2answers
224 views

General question about Parent and Child Post type relationships

I'm hardly an expert on the matter but from reading around this Q&A site i have the following notion that one Post Type cannot be the Parent of another Post Type. What i can't seem to answer is ...
0
votes
1answer
85 views

Custom post type as page template

I've been building my very first WordPress theme using the Advanced Custom Fields plugin. Here are the steps I've taken so far: Created custom post type via functions.php. Created ...
0
votes
1answer
798 views

Adding an extra parameter [string] to my posts' permalink?

I've been searching the internet for 6 hours now, so I decided to ask this in the forum and would appreciate every help. I just want my permalink to say (e.g. portfolio, post, etc) ...
0
votes
1answer
828 views

Pagination for Custom Taxonomy Page [duplicate]

I'm having an issue getting my custom taxonomy page to paginate correctly. I looked through other examples posted on this forum, but I could not get my second page to not return a 404 error page. ...
0
votes
1answer
45 views

Custom template support for custom post type?

I know I can use single-{posttype}.php but can I use something like single-{custom-post-type-slug}.php to target a specific custom post type post? Or is there another way like a custom template which ...
0
votes
0answers
21 views

Turn Custom Post Title into external link [duplicate]

I created a Custom Post Type called News, which supports Title, Editor, Thumbnail and Custom Fields. One of the Custom Fields is URL. What I need now is to turn the Title in a external link in the ...
0
votes
1answer
80 views

Trouble with pagination

So, been reading tons of posts on here and int he Codex but just not having any luck. I have a custom post type called Work. On my portfolio page I have "posts_per_page" set to 12. In total in this ...
1
vote
1answer
107 views

How to use manage_$post_type_posts_columns with underscore in post type?

I have a post type 'job_listing' and I want to use manage_{$post_type}_posts_columns filter in it. I tried manage_job_listing_posts_columns but it's not working because of the underscore in the post ...
0
votes
1answer
1k views

get_category_link() for custom post type does not include custom slug rewrite?

I am getting a list of categories for a custom post type project using get_categories($args) with the following arguments: $args = array( 'type'=> 'project', 'orderby'=> 'name', 'order'=> ...
0
votes
1answer
94 views

Is it possible to add custom business logic to a Custom Post Admin Edit Page?

I have a custom post type that has a few fields that accept amounts. Each amount is editable. I would like to display the total of these amounts in another non-editable field on the same Custom Post ...
0
votes
1answer
519 views

How to use a dedicated template for the Custom Post Type from a plugin?

I'm working through this tutorial on Custom Post Types (in a plugin) wherein the author demonstrates how to force the use of a dedicated template for the Custom Post Type. The author states thus: ...
0
votes
0answers
91 views

Using one custom taxonomy.php for two custom taxonomies?

I have registered 2 custom taxonomies, 'allergy' and 'gmc_allergy' which are of post type 'gmc_recipe'. I have a taxonomy-allergy.php and when I go to blah.com?allergy=test then it correctly lists ...
3
votes
5answers
1k views

Create a custom archive page for a custom post type in a plugin

I'm writing a plugin that creates a custom post type named "my_plugin_lesson": $args = array ( 'public' => true, 'has_archive' => true, 'rewrite' => array('slug' => 'lessons', ...
0
votes
0answers
27 views

Plugins for putting Custom Post Types into the Menu

I have been building a website that has numerous custom post types, and I have found one called WordPress Post Type Archive Links. This would allow me to add a link to the an archive of registered ...
1
vote
0answers
1k views

Integrate Custom Post Type Events into Calendar

I've got a custom post type called Events on my site with a custom field called event_date created via Advanced Custom fields that stores its value in yymmdd format. Everything works just fine and I'm ...
0
votes
1answer
75 views

Archive Template being used instead of Category Template for Custom Post Type

I have a Custom Post Type created, that has its own Custom Taxonomy that give the Posts their own Categorys. I am currently building the Templates. The Custom Post Type has the slug service, and the ...
0
votes
0answers
480 views

Wordpress Load more posts by ajax not working

i need to get the wordpress posts while click the load more button or something else, so i have followed the tutorial by Here <?php /* Template Name: Additional Posts */ $offset = ...
0
votes
1answer
55 views

Hierarchy between post types

So I'm working on a Wordpress site for a school. I have a page called "Faculty Staff Directory" and I also have a custom type called "Staff", with teacher profiles. I've enabled the "staff" post type ...
0
votes
1answer
135 views

Displaying information from custom field on custom post type

I have videos set up as a custom post type and music, commercial, promo set up as categories within this post type: I have a function that displays a custom meta box on the videos post type pages in ...
0
votes
1answer
55 views

Custom post type 404 error on “default” or “numeric” permalinks

I wrote a plugin for WP.org that uses a custom post type with the slug "reading-list" and I cannot view mysite.com/reading-list/ when I have either the "default" or "numeric" permalinks setting in ...
0
votes
1answer
365 views

Can't sort order of wp_query with 2 meta keys

I'm trying to display custom post types by excluding the sold ones but also by displaying them in alphabetical order from the county meta_key. I'm trying to use pre_get_posts but I'm not sure that ...
0
votes
1answer
46 views

Fallback if statement based on the number filtered from it

I'm trying to add three ads on a page. I have a custom post type called 'ads' and I'm using advanced custom fields to add a start date an end date and an option to select which pages to associate them ...
1
vote
2answers
117 views

Custom Post Type archive loop separated by term, in specific term order

I have a custom post type registered (our-team) and I have a taxonomy (team-categories) with multiple terms. Each term has multiple posts assigned to it. On my custom post type archive ...
5
votes
2answers
1k views

Meta Boxes: 'admin_init' or 'add_meta_boxes' hook?

When setting up meta boxes in a custom post type I've been do so using the add_meta_boxes hook, e.g. add_action('add_meta_boxes', 'meta_box_setup'); function meta_box_setup() { add_meta_box( ...
0
votes
1answer
2k views

exclude custom post type by meta key in wp_query

I'm trying to display a custom post type (properties) and exclude posts that have a certain meta value (sold). Is there a way that I can do this? I have this for my code so far: ...