Adding admin menu seperators around CPT’s
Adding admin menu seperators around CPT’s
Adding admin menu seperators around CPT’s
Loop to display parent categories in custom taxonomy
Instead of changing all the columns just add and remove the columns that you want. add_filter( ‘manage_edit-listing_columns’, ‘et_listing_edit_columns’ ); function et_listing_edit_columns( $columns ) { $columns[‘et_listing_type’] = __( ‘Type’, ‘Explorable’ ); $columns[‘et_listing_location’] = __( ‘Location’, ‘Explorable’ ); // You can remove columns with unset() return $columns; }
Can I show some specific post rather than latest post?
I don’t recommend using category as cpt try rename it for example in product-type. For more information on category see on codex: Taxonomies function my_custom_post_product_type() { $labels = array( ‘name’ => _x( ‘Product Types’ ), ‘singular_name’ => _x( ‘Product Type’ ), ‘add_new’ => _x( ‘Add New’ ), ‘add_new_item’ => __( ‘Add New Product Type’ ), … Read more
Delete Post by User
First of all, a taxonomy-{taxonomy}.php file is an Archive Template and not a good name for a custom template. So if you want to proceed with a custom template, try naming the file with something like template-cities.php and call the file to a Page. Otherwise, make a simple taxonomy-{taxonomy}.php archive template, and in your case … Read more
is using “require_once” in wordpress theme affect the speed ???
try this, I believe this should allow you to have category taxonomy in menu and available in your custom post type. function custom_post_type() { $labels = array( ‘name’ => _x( ‘Post Types’, ‘Post Type General Name’, ‘text_domain’ ), ‘singular_name’ => _x( ‘hotel’, ‘Post Type Singular Name’, ‘text_domain’ ), ‘menu_name’ => __( ‘Post Types’, ‘text_domain’ ), … Read more
get_the_category() is for getting the default post categories and get_the_tag_list() for the default post tags. For custom taxonomies you must use get_the_terms(), i.e. get_the_terms( ‘categoria-video’ ) and get_the_terms( ‘tag-video’ ) in your case. Note that these functions don’t print anything, they just return an array. If you check out the documentation for get_the_terms() you’ll find … Read more