Articles of custom post types

Have a Custom Post Type index page display taxonomy items instead of posts

I have a CPT registered that is called lessons with a custom taxonomy (category) that is called courses. I want the /courses page (archive-courses.php?) to display the individual courses (i.e. “online marketing”, “paid advertising”) and not the individual posts (lessons). Would this mean I’d just customize the loop, or a complete custom WP_Query?

Custom Post Types for Support Ticket plugin?

I am about to write a (quite simple) plugin for support tickets, where a user signs up, adds one or more sites, and adds support tickets under each of the sites. My question is about how to structure this without relying on other plugins for functionality: The user signs up and gets a new role […]

How to set up htaccess to redirect a particular post type or subdirectory to HTTPS?

I have a post type with the slug ‘open-tour’, so all its pages are under www.domain.com/open-tour/. I need all the pages under this “directory” to go to HTTPS (for credit card payments). I can redirect a single URL okay, but the dynamic stuff goes a bit over my head. Maybe it’s also because I don’t […]

Enable sticky posts to custom post_type

i have this custom post_type: tvr_apartment function custom_post_apartment() { $labels = array( ‘name’ => ‘Apartments’, ‘singular_name’ => ‘Apartment’, ‘add_new’ => ‘Add New’, ‘add_new_item’ => ‘Add New Apartment’, ‘edit_item’ => ‘Edit Apartment’, ‘new_item’ => ‘New Apartment’, ‘all_items’ => ‘All Apartments’, ‘view_item’ => ‘View Apartment’, ‘search_items’ => ‘Search Apartments’, ‘not_found’ => ‘No apartments found’, ‘not_found_in_trash’ => ‘No […]

How to sort custom post type posts in default order by multiple fields?

I’m with a non-profit that paid for development of a custom post type plugin that will help us track endangered plants that we’re keeping in cultivation, rescued from development. We’re mostly happy with it, but need a bit of help. Our plugin is called nasc_report and we have multiple “authors” who are generating reports. The […]

Rewrite custom post type url's adding meta box values

I’ve got these custom post types (CPT) and meta boxes: Movies (CPT) Genre (Meta box) Genres (CPT) If one movie is called Die hard then I want the permalink to be: /genres/action/die-hard This is easily fixed by setting the movie-CPT to ‘rewrite’ => false and use this code instead: add_action(‘init’, ‘rb_add_rewrite_rules’); add_filter(‘post_type_link’, ‘rb_create_permalinks’, 10, 3); […]

Custom Post Types relationships

I have a custom post type for my videos. I need do related it with other post category. And i have 10 category Like this : Post Category – Video Category Tech Tech Marketing Marketing News News ………………… I want to do for this. I have a post Category Tech and I have custom post […]

Fake mark a menu item as current_page_item/active in WordPress

I have a custom post type called Books and a page structure like this: Home Products & Services – Services – Products — Books I am using WordPress custom Menus for the 1st level navigation (displayed horizontally), and wp_list_pages to print out the subnavigation based on the page selected from the 1st level of navigation […]

Is slug “type” reserved and can't be used in taxonomy rewrite?

I desperately need your help guys. I am trying to register custom post type and taxonomy the following way: add_action( ‘init’, ‘product_catalog’ ); add_action( ‘init’, ‘product_type’, 0 ); function product_catalog() { $labels = array( ‘name’ => _x( ‘Catalog’, ‘post type general name’ ), ‘menu_name’ => ‘Catalog’ ); $args = array( ‘labels’ => $labels, ‘description’ => […]

How to get a list of term names of the custom post type im currently on in single.php

Ok so I have a custom post type of “Products” and a custom taxonomy of “Types”. Now in the types taxonomy I have dozens of categories and sub categories assigned to custom post types. Custom Post Type Item: Blue Car Categories assigned to car: Honda > Accord > LX So what I am trying to […]