Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi,

    This is not really intended as a menu item. There is a widget that you can use.

    There is also a shortcode available at:
    https://codeberg.org/cyclotouriste/zeno-font-resizer-shortcode

    Then you could also place some PHP code in the header.php template of your theme. With CSS you could place it close to the menu.

    If you managed to get it in your header but want to place it differently, could you tell your address? Then I can take a look if I can write some CSS for you.

    Thread Starter grich101

    (@grich101)

    I’ve used short code but it is not applying for navigation menu and other text in <p>p</>. Only applying for H tags

    Plugin Author Marcel Pol

    (@mpol)

    Can you share the address of your website? I can then take a look. It might be that your theme and this plugin don’t go together.

    Thread Starter grich101

    (@grich101)

    https://sinm.nl/
    please remove this url after looking at this

    • This reply was modified 1 year, 5 months ago by grich101.
    Plugin Author Marcel Pol

    (@mpol)

    Hi, what happens if you set it on the body element in the settings?

    Also, to your custom CSS you could add padding-right: 5px; .

    And sorry for the slow reply, I was away for a few days.

    Thread Starter grich101

    (@grich101)

    HI I’ve used the below code to add this function in menu as shortcode

    function add_shortcode_to_last_menu_item($sorted_menu_items, $args) {
        // Get the total number of menu items
        $menu_item_count = count($sorted_menu_items);
    
        // Get the shortcode you want to add
        $shortcode = '[zeno_font_resizer]';
    
        // Check if it's the last menu item
        if ($sorted_menu_items[$menu_item_count - 1]->menu_order == $menu_item_count) {
            // Append the shortcode to the last menu item title
            $sorted_menu_items[$menu_item_count - 1]->title .= ' ' . $shortcode;
        }
    
        return $sorted_menu_items;
    }
    add_filter('wp_nav_menu_objects', 'add_shortcode_to_last_menu_item', 10, 2);
    
    
    function zeno_font_resizer_place_shortcode() {
    
    	return zeno_font_resizer_place( false );
    
    }
    add_shortcode('zeno_font_resizer', 'zeno_font_resizer_place_shortcode');
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘as menu’ is closed to new replies.