Freed from comment; the asker really did not want to write an answer. :/
function convert_root_cats_to_radio()
{
global $post_type;
?>
<script type="text/javascript">
jQuery("#activitycategorychecklist>li>label input").each(function(){
this.disabled = "disabled";
});
jQuery("#activitycategorychecklist>li>ul>li>label input").each(function(){
this.type="radio";
});
jQuery("#activitycategory-tabs li:odd").hide();
</script> <?php
}
add_action( 'admin_footer-post.php', 'convert_root_cats_to_radio' );
add_action( 'admin_footer-post-new.php', 'convert_root_cats_to_radio' );
Related Posts:
- get_terms won’t display product_cat or any other custom taxonomies when specified
- Can I restrict category availability?
- create a “add icon” field in taxonomies page
- Get meta values from parent post and save in child post
- Displaying wp post categories into my custom metabox
- Need to build custom metabox select prev posts by category
- Visual editor issue by having multiple tiny mce editors in a CPT
- Multiple level category drop-down from the WordPress dashboard
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- Add custom post type settings to wordress default posts
- A better way to add a meta box to custom post types
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- Hide parent categories when clicked, and show it’s childs
- Plugin – Combine Meta Box Input Fields into single saveble record
- Limit amount of posts made within a custom taxonomy
- Problem with displaying posts in the CPT category
- Getting Custom Post Type Meta on Publish
- Filter CPT posts by one or more categories
- Getting categories of posts under a custom taxonomy
- Custom Post Types with a common category for a blog listing
- Can’t remove front from permalinks for custom taxonomy category page
- How to get categories linked in posts for a specific post type
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- Custom post type, organized by categories
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- How to Upload CSV Data into Custom Post Type Data with Metabox programmatically
- Grouping metadatas into one
- Remove CPT name from permalink but add %category% instead
- Set a checkmark in a category based on a URL-parameter
- Anon function and add_meta_box
- WP Query with categories only shows one post and ignores the category
- Metabox not show in categories custom post type cmb2
- Adding custom post type to count in category
- How to edit this code to get the categories in achieve page?
- Category with post type pagination returns 404
- Custom Post Type and Category Base Rewrite Issue
- Get the category from custom post type
- Post injections into Site Origins Page builder [closed]
- Custom Post Type + Categories
- How to create a gallery page with categories?
- Repeatable Fields Metabox with Textarea (or wp_editor)
- How to use TinyMCE Editor for one of my custom post meta field?
- Display correctly using metabox.io
- Custom Post Slug same as Parents Category Slug
- WordPress posts page for customer filtering and sorting along with category filter
- Create Connection Between two post types
- pre_get_posts for custom page builder meta box
- Disable closing on metaboxes
- I am having Trouble to get list of Categories of Custom post Type
- Hierarchy and access control for Custom Post Types (CPT)
- Multiple (two) category postings on the same page.
- Loop filtering Custom Post Types and/or Categories
- School & class blogs: Categorize with categories or custom posts?
- Custom post type and category link together
- Why is my category template ignoring post type?
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- How to get custom posts sub category link
- Show Custom Post Type meta boxes only on Page Edit
- Cannot save CPT meta box
- Not sure if I should create multiple custom post type [closed]
- Cross reference custom post types
- How to make custom taxonomy into drop down select in a custom metabox
- Adding Page Templates to post but it ignored it
- Parent Page and Breadcrumb URL’s for Custom Post Types Not Working
- Make a custom_post translatable
- Pre-selecting the category for a custom post type
- Create a Dropdown from Custom Post Type
- Translating custom post type metaboxes [closed]
- Adding a metabox on a CPT’s submenu page
- Fixed values for same post translations
- How to Add multiple instance of meta box to custom post type
- browse by category and tags?
- Using POST method in meta box, no results
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- meta box on custom post type
- Categories filtering in new post
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom post types and category archive
- List of Posts and Categories
- Checking if $_FILE isset for an array of file upload metaboxes
- How can I show 1 featured post in a styled element, and the next few below differently styled
- Ordering values entered in Custom Taxonomies
- Listing custom terms in custom post meta
- Permalinks: custom structure for taxonomy – tags?
- How do you create a custom template to display a category with an image and related posts below?
- How can I list Custom Post Types created with the Types plugin under categories?
- List Taxonomies: Don’t list taxonomy if it has no post – depending on custom post-meta?
- Custom Post Type & Meta Box – Displaying meta box information on front end?
- How can I move (or create another) publish button?
- Wrap meta boxes & data handling for specific post types in classes?
- Can custom fields be added without a meta box?
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Meta Box on Custom Post Type not saving
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Custom templates for a specific category
- Custom “radio button meta box” not saving correctly
- Global custom meta box
- Sizing textarea field in custom metabox