• Resolved roberto21

    (@roberto21)


    The plugin works fine in “hello” elementor theme. where I set up the menu items inserting the classes in the custom link menu items. I would like to get rid of elementor and use a block theme, e.g. twenty-twentyfour. I did not manage to make it work with this theme. I added the menu support for the theme, but still I could not insert the classes there (the spot to insert the “optional” class is missing). I managed to have login and logout in the navigation menu using the login/logout block and inserting the class there, but there is no way to have the “hello username” there. How should I proceed for the new FSE? Thasnk you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter roberto21

    (@roberto21)

    Forget about this, is a duplicate of a question asked a few months ago (sorry, I forgot). However something changed (for the worse): If you create a menu using appearance-> menus, this menu is not recognized at all by the Appearance->editor->navigation, so you cannot insert it for example in the header. You can only generate a navigation menu with the blocks, and here the login/logout)hello username of this plugin do not work. Gutenverse, on the other hand, allows you to select that menu, and everything works.

    I apologize again.

    Plugin Author xootix

    (@xootix)

    Hello Roberto,

    Yes, menu links don’t work with the block theme. How about using the shortcode? The shortcode now gives you the ability to include the username.

     [xoo_el_action type="login change_to="logout" change_to_text="Logout {username}?"]
    Thread Starter roberto21

    (@roberto21)

    You are right, but my problem (due without doubt to my lack of experience in the matter) is that I do not understand how you can insert shortcodes in the block menu. At least, I tried and i got the message “cannot insert this block” (shortcodes are blocks themselves). If there is a way of doing it, can you point the documentation to me? Thank you a lot for your attention.

    Thread Starter roberto21

    (@roberto21)

    I tried to follow the suggestions in the web, so I added the code in functions,php to add support for the menus in twenty-twentyfour and allow shortcodes in menus

    function register_my_menu() {

    ? ? register_nav_menu('header-menu',__( 'Header Menu' ));

    ? }

    ? add_action( 'init', 'register_my_menu' );

    /**

    ?* Enable shortcodes for menu navigation.

    ?*/

    if ( ! has_filter( 'wp_nav_menu', 'do_shortcode' ) ) {

    ? ? add_filter( 'wp_nav_menu', 'shortcode_unautop' );

    ? ? add_filter( 'wp_nav_menu', 'do_shortcode', 11 );

    }

    Al this does not seem to work. Inserting the shortcode in the menu label, it just gets repeated in the menu without being executed. Maybe this trick does not work in block themes anyway.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.