Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3685510
Smart Wishlist Icon in Primary Header menu
Open

Comments

  • Cristian started the conversation

    Hello, I'd like to show the Wishlist icon in Header Primary Menu. By now I'm only able to show the writte "Wishlist" at the end of primary menu (you can see in italian as "Lista desideri" here: https://test2024.carlomagnolaboratori.com/ )

    Is there a shortcode or a snippet to do this? Thank you!

  •  1,355
    Dustin replied

    Hi Cristian,

    Please add the custom code below. (How to add custom code? ↗):

    add_shortcode( 'woosw_menu', function () {
        $output = '';
        if ( class_exists( 'WPCleverWoosw' ) ) {
            $output .= '<ul class="woosw-header-menu"><li class="woosw-menu-item">';
            $output .= '<a href="' . esc_url( WPCleverWoosw::get_url() ) . '">';
            $output .= '<span class="woosw-menu-item-inner" data-count="' . esc_attr( WPCleverWoosw::get_count() ) . '"></span>';
            $output .= '</a>';
            $output .= '</li></ul>';
        }
        return $output;
    } );

    Then, you can place the shortcode [woosw_menu] on your header to show the wishlist icon with the counter.

    Best regards,
    Dustin

  • Cristian replied

    Hello, thanks for your answer. I've tried to add the custom code, but when I place the shortcode it shows always the written "Wishlist" and not the icon. You can check it on the last voice of header menu in https://test2024.carlomagnolaboratori.com/. How can I do in order to show the icon of the wishlist instead of the written?

    Thank you.

  •  1,355
    Dustin replied

    Please also send me the credentials (wp-admin link, username, and password) of this site, and then I'll help you implement the wishlist on the site's header.

    Best regards,
    Dustin

  •  1
    Nurettin replied

    Excuse me,

    This code helped me a lot. But I want to ask something.

    When we add a Shortcode, it appears as a tag. How can I add an icon of my choice instead of a label?

    Thank you very much in advance :)


    Attached files:  istek.jpg

  •  1,355
    Dustin replied

    Hi Nurettin,

    I must have overlooked your ticket. I'm so sorry about that!

    Please send me your website credentials (wp-admin link, username, and password) or create a dev/staging site with identical configurations so I can check and implement the wishlist icon on the header.

    Best regards,
    Dustin

  •  1
    Nurettin replied

    Thank you very much for your feedback.

    I was able to do what I wanted using the heart symbol.

    It's okay now, thank you. :)

    Attached files:  aliden.jpg