How to remove howdy dropdown menu content

You can use wordpress nodes to customize profile menu. Add this in functions.php add_action( ‘admin_bar_menu’, ‘remove_my_account’, 999 ); function remove_my_account( $wp_admin_bar ) { $wp_admin_bar->remove_node( ‘my-account’ ); } add_action( ‘admin_bar_menu’, ‘add_logout’, 999 ); function add_logout( $wp_admin_bar ) { $args = array( ‘id’ => ‘logout’, // id of the existing child node (New > Post) ‘title’ => … Read more

Disable front-page.php template

Maybe template_include filter would get the job done for you. Something along these lines, function prefix_another_front_page_template( $template ) { if ( is_front_page() ) { $another_front_page_template=”something.php”; // adjust as needed $new_template = locate_template( array( $another_front_page_template ) ); if ( !empty( $new_template ) ) { return $new_template; } } return $template; } add_filter( ‘template_include’, ‘prefix_another_front_page_template’, 99 );

How to add an HTML tag to the Header?

The hook you’re looking for is wp_head. functions.php add_action( ‘wp_head’, ‘se343581_add_preload_tag’, 5); function se343581_add_preload_tag() { echo ‘<link rel=”preload” href=”‘. plugins_url(‘/gdpr-cookie-compliance/dist/styles/lity.css’) . ‘” as=”style”>’; // // — if added in plugin file — // echo ‘<link rel=”preload” href=”‘ . plugin_dir_url( __FILE__ ) . ‘some_subdir/file_name.css” as=”style”>’; }

creating custom archive template within plugin for custom post type using archive_template filter

I was able to get it working as desired using the condition is_archive() && get_post_type($post) == ‘product’. I also created a custom taxonomy for products as product-category below is the code: function get_custom_post_type_template( $archive_template ) { global $post; $plugin_root_dir = WP_PLUGIN_DIR.’/product-plugin/’; if (is_archive() && get_post_type($post) == ‘product’) { $archive_template = $plugin_root_dir.’/inc/templates/archive-product.php’ } return $archive_template; } … Read more