Style not work as expected
-
Hello,
I am trying to put it in the theme top menu by the following code snippet:
function enable_shortcodes_in_menu_items($menu_items) {
foreach ($menu_items as $menu_item) {
// Ensure the menu item title is a string before applying shortcodes
if (is_string($menu_item->title)) {
$menu_item->title = do_shortcode($menu_item->title);
}
}
return $menu_items;
}
add_filter('wp_nav_menu_objects', 'enable_shortcodes_in_menu_items');The currency switcher menu item shows up, however, the style does not work as expected.
We also use this plugin at https://wordpress.org/plugins/gtranslate/, and you might note the currency switcher does not align center:
https://prnt.sc/GWZfIAbqUq-yIf we use the plugin at https://wordpress.org/plugins/woocommerce-currency-switcher/, the Align style works fine both in vertical and horizontal:
https://prnt.sc/0OHLV2nqJygsSince we prefer this plugin and tried a lot, but still can not fix it.
Could you please provide a custom CSS to set the currency switcher to be align center both in vertical and horizontal and set gap to be “0”?
Thanks
- You must be logged in to reply to this topic.