Custom edit post column – category not showing

Here I tested this code and its working fine and steps here. I am just creating a dummy custom_post_type here book with the following code. function kv_custom_post_books() { $args = array( ‘public’ => true, ‘label’ => ‘Books’, ‘taxonomies’ => array(‘category’, ‘post_tag’) , ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’ ) ); register_post_type( ‘book’, $args ); } … Read more

How-to stop wordpress from saving utf8 non-breaking space characters

Both initial creation and updates for the posts pass through wp_insert_post_data (among other filters). You can modify post_content item in array passed to make the replacement you need, before it proceeds on to be saved in database. Update Code pasted from comments add_filter( ‘wp_insert_post_data’, ‘rm_wp_insert_post_data’, ’99’, 2 ); function rm_wp_insert_post_data ( $data , $postarr ) … Read more

TinyMCE Autoresize

Here’s a solution. There’s a slight problem as it does not recognize when images are added to the editor. 1: Create a folder with the name tinymce-autoresize in the plugins folder. 2. Create a file in tinymce-autoresize named tinymce_autoresize.php with this content: function intialize_autoresize_plugin() { // Check user permission if ( ! current_user_can(‘edit_posts’) && ! … Read more

How to display and use all existing tags at my write-post-at-frontend-panel?

try something like this: <?php $taxonomies = array( ‘wissen_tags’ ); $args = array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘hide_empty’ => false ); $terms = get_terms($taxonomies,$args); if (count($terms) > 0): i = 0; foreach ($terms as $term): ?> <div class=”wissen_tag_list”> <input type=”radio” value=”<?php echo $term->term_id; ?>” name=”wissen_tags” class=”wissen_tag_list_ckb” <?php if ( $i == 0 ) … Read more

Adding a Nav menu to post admin

To see how such a list can be created look at the code in wp-admin/includes/nav-menu.php. Unfortunately, it is hard coded there, so you have to re-create the code. First, let’s create two menus: We can get these menus in PHP with wp_get_nav_menus() (a wrapper for get_terms()): $menus = wp_get_nav_menus(); print ‘<pre>’ . htmlspecialchars( print_r( $menus, … Read more