Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1339823
    renutrition
    Participant

    I’m trying to trigger a sumome email optin form to open directly from my header menu, but I can’t seem to get it to work without changing the formatting that I have currently set up…

    So my question is, how can I place:

    Click Here

    Into the menu in a way that allows the optin form to appear directly from a click in the menu? I have very minimal coding background, so I apologize if this is really simple haha! Any help is much appreciated!

    My website is renutrition.com by the way

    #1339824
    renutrition
    Participant

    haha sorry the code is:

    <a data-sumome-listbuilder-id="ec76e31b-245f-4172-bd95-8e14daaf6724">Click Here</a>

    #1340108
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! To resolve your issue, since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // Add Sumome menu item
    // =============================================================================
    function custom_sumome_menu_item( $items, $args ) {
    
      if ( $args->theme_location == 'primary' ) {
        $items .= '<li class="menu-item x-menu-item x-menu-item-facetime">'
                  . '<a data-sumome-listbuilder-id="ec76e31b-245f-4172-bd95-8e14daaf6724" class="x-btn-navbar-sumome">'
                    . 'Click Here'
                  . '</a>'
                . '</li>';
      }
    
      return $items;
    
    }
    add_filter( 'wp_nav_menu_items', 'custom_sumome_menu_item', 9999, 2 );
    // =============================================================================

    We would loved to know if this has work for you. Thank you.

    #1340779
    renutrition
    Participant

    Great so far!

    So we have a menu item that functions well, now I would like to format it to look like the LOGIN item/button to the left of it (hover, click, etc.)

    You guys are awesome btw. Much appreciated.

    #1341015
    Lely
    Moderator

    Hello There,

    Try adding this custom CSS on Appearance > Customize > Custom > Edit Global CSS:

    a.x-btn-navbar-sumome {
        box-shadow: none !important;
        border: 1px solid #ffffff;
        padding: 10px 15px !important;
        border-radius: 2px;
        height: auto !important;
        margin-top: 14px !important;
    }
    a.x-btn-navbar-sumome:hover {
        background-color: #ffffff !important;
        color: #6aaa75 !important;
    }

    Thank you for the kind words!
    Cheers!

    #1342134
    renutrition
    Participant

    Worked perfectly, thanks again!

    #1342250
    Nico
    Moderator

    Happy to hear that.

    Feel free to ask us again.

    THanks.

    #1343405
    renutrition
    Participant

    Ok, I have one more question.

    I would like to trigger this same optin form to open with a regular button click on other buttons on my site. How would I do that?

    #1343518
    Rupok
    Member

    Hey there,

    Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

    #1344707
    renutrition
    Participant

    Ok, no worries. I’ll figure it out. Thanks anyways.

    #1344880
    Rahul
    Moderator

    You’re most welcome!

    Let us know if we can help with anything else.

    Thanks for choosing the X-theme.

  • <script> jQuery(function($){ $("#no-reply-1339823 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>