How to change mobile menu (toggle) icon in WordPress – Full Site Editing?
How to change mobile menu (toggle) icon in WordPress – Full Site Editing?
How to change mobile menu (toggle) icon in WordPress – Full Site Editing?
It’s not images, its fontawesome icons, and the fontawesome library is not being called. so you can add the below code to your theme functions.php add_action( ‘wp_enqueue_scripts’, ‘enqueue_load_fa’ ); function enqueue_load_fa() { wp_enqueue_style( ‘load-fa’, ‘https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css’ ); } thats how the current icons for the menus will be showing.
SVG showing only in square ratio (using elementor) [closed]
Plugin Icon does not work correctly
According to the plugin directory assets page in the Plugin Handbook, create one or more of the following, relative to your plugin root directory: assets/icon-128×128.(png|jpg) assets/icon-256×256.(png|jpg) assets/icon.svg
So after a little digging and being maybe a little bit oblivious 😅. The correct way to use dashicons within WordPress is as follows; import { Dashicon } from “@wordpress/components”; <Dashicon icon=”post-status” /> Note: This info can be found in the Developer Resources: Dashicons docs, but annoyingly it is buried at the bottom of the … Read more
The tutorial shows you how to add a class and style it. add_filter( ‘wp_nav_menu_items’,’add_search_box’, 10, 2 ); function add_search_box( $items, $args ) { $items .= ‘<li class=”your-class”>’ . get_search_form( ‘echo=0’ ) . ‘</li>’; return $items; } For CSS questions, please ask on Stackoverflow. But the code doesn’t enable you to select between the primary or … Read more
Sometimes i find wordpress can be quite finiky when it comes to referencing files within the plugin. Specifying a full path seems to fix the problem. Try replacing… market_admin/icon.png With… /wp-content/plugins/your-plugin-name-goes-here/your-file-name-goes-here.png
There might be a better way to do this, but I would use jQuery to target the menu items and .addClass(). So, something like: $( document ).ready(function() { $(“.menu-item-one”).addClass(“fa fa-icon”); );
This code works perfectly for me: add_action( ‘admin_head’, ‘my_icons’ ); function my_icons() { ?> <style type=”text/css” media=”screen”> #menu-posts-product .wp-menu-image, .icon32-posts-product { background: url(<?php echo get_template_directory_uri(); ?>/img/contactLensemenu.png) no-repeat center center!important; } #menu-posts-product .wp-menu-image { background-size:16px 16px!important; } .icon32-posts-product { background-size:32px 32px!important; } </style> <?php } ?> PHP part is the same of the yours, (except for … Read more