Automatically add tag if a checkbox is checked

If I understand what you want I would call it on the save_post hook: https://codex.wordpress.org/Plugin_API/Action_Reference/save_post So the code would be something a little like: function wphuyeh8_save_post_tag( $post_id, $post, $update ) { // If example is set and not false if($_REQUEST[‘_example’]): // set the tag wp_set_post_tags( $post_ID, ‘example’, true ); else: // remove the tag if … Read more

How I can add div to menu?

When using wp_nav_menu you can pass arguments to it which help you style the output, look at: $container Whether to wrap the ul, and what to wrap it with. Allowed tags are div and nav. Use false for no container e.g. container => false . $container_class the class that is applied to the container. $container_id … Read more

Multisite Admin Roles

You can write a small custom function, that loop about the network and add in each site of the network the new role. See the source below als example to add_role. If you like update or change a existing role, then switch from add_role to add_cap. function fb_change_role_network_wide( $role ) { global $wpdb; $args = … Read more