WordPress Admin sub-level menu issue

Got it working like this: function print_admin_menu() { add_options_page( ‘Print Configuration’, ‘Print Configuration’, ‘manage_options’, ‘print_admin_config_page’, ‘my_callback’ ); } function my_callback(){ ?> <div class=”wrap”> <h2>Welcome To My Plugin</h2> </div> <?php }

How to disable users to view Other pages

<?php add_filter(‘pre_get_posts’, ‘my_current_author_posts’); function my_current_author_posts( $query ) { global $pagenow; // Check if you are on the right Admin page, do nothing if not if( ‘edit.php’ != $pagenow || ! isset( $_GET[‘post_type’] ) || ‘page’ != $_GET[‘post_type’] || ! is_admin() ) { return; } // get current user Object $current_user = wp_get_current_user(); // check user … Read more

WP-CLI plugin delete command fails silently

I think you’re right and this could be a permissions related issue. First of all I wouldn’t recommend chanching all the WordPress directory permissions, only the wp-content directory and not to 777, instead permissions should be 755. Probably you can’t change permissions on your FTP client because you’re not the owner of those files, more … Read more

Using multi-dimensional array with filter

If you using add_filter you should recieve some params, filter than and return it back. If not you will lose previously defined data. function wte_fixed_starting_dates_license($array) { Also see array_merge function. And your example returning right array. license is empty, but other elements is ok.

Taxonomy Category Icon on index page

Since you want the icons to appear in a specific place, this seems more like theme territory rather than plugin. One way to achieve your goal: Create a child theme (or edit the one you’re already using). Copy your homepage template (it’s unlikely you want to change index.php; you’re probably looking for front-page.php or home.php, … Read more