How to remove all the items under “Personal Options” on user profile page?

I think this is the kind of thing you had in mind. add_action( ‘admin_print_styles-profile.php’, ‘remove_profile_fields’ ); add_action( ‘admin_print_styles-user-edit.php’, ‘remove_profile_fields’ ); function remove_profile_fields( $hook ) { ?> <style type=”text/css”> form#your-profile p+h3, form#your-profile p+h3+table { display:none!important;visibility:hidden!important; } </style> <?php } There aren’t any actions or filters to remove the items you’re referring to(with exception the admin color … Read more

Theme compression/ minifying or W3 Total Cache – which should I use? [closed]

I find that W3 Total Cache works well for me in doing minifying and gzipping. (I’m not sure about the others.) More generally, if there’s a plugin that does something, I use the plugin. It’s very rare to see a do-it-all theme do something better than a specialized, single-function plugin, particularly when that plugin is … Read more

Keep Title and Description always

In any properly coded theme the title should be completely generated with wp_title() and easily filterable to specific string (in functions.php or otherwise): add_filter( ‘wp_title’, function () { return get_bloginfo( ‘name’ ) . ‘ | ‘ . get_bloginfo( ‘description’ ); } );

Create “alternative/zebra” boxes in the content area?

If you’re looking to duplicate the shortcode method mentioned in your question, you could do something like this. Either of the following two options can be added to your themes functions.php file. Basic “Box” // Add Box Shortcode function wpse_168480_box_shortcode( $atts , $content = null ) { return ‘<div class=”myBox”>’.$content.'</div>’; } add_shortcode( ‘box’, ‘wpse_168480_box_shortcode’ ); … Read more

Is it possible to change the structure of the HTML generated by the_content()? If yes, how? If not, is there a workaround?

You can use the_content filter, to literally filter the content into your structure. Somthing like this <?php add_filter(‘the_content’,function($the_content){ // find blockquotes $regex = ‘/<blockquote>(.+?)<\/blockquote>([\n|$])/i’; $blockquotes = preg_match_all($regex,$the_content,$matches); // remove blockquotes $main_content = preg_replace($regex,”,$the_content); // rebuild blockqoutes $my_blockquotes=””; foreach ($matches[1] as $blockquote) { $my_blockquotes .= “<blockquote>{$blockquote}</blockquote>”; } // rebuild content $new_content=””; if (!empty($my_blockquotes)) { $new_content = … Read more

How to locate where an element is generated?

SlickNav looks to be a “Responsive Mobile Menu Plugin for jQuery”. Your theme probably ships with it. It’s written in JavaScript so try greping for the class name slicknav_menu in the JavaScript files included with the theme. As an aside, another debugging tip for next time: Most browser dev tools allow you to disable JavaScript. … Read more

How do I remove a customiser option from a parent theme in a child theme?

From the documentation: To add, remove, or modify any Customizer object, and to access the Customizer Manager, use the customize_register hook: function themeslug_customize_register( $wp_customize ) { // Do stuff with $wp_customize, the WP_Customize_Manager object. } add_action( ‘customize_register’, ‘themeslug_customize_register’ ); The Customizer Manager provides add_, get_, and remove_ methods for each Customizer object type; each works … Read more