• Hi,

    I have a query regarding subscribing to a newsletter on my website. I’m using the mail chimp widget but there is no option for an icon in the nav bar, only a sort of clunky sidebar option. The ideal would be to have an envelope icon and for it to open a pop up (something which can be done with the mail chimp widget, but is automatic when you refresh the page).

    Does anyone have any idea whether this might be possible? My website is https://www.ouishi.com

    Thanks in advance

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @dashr,
    You can refer to the plugin: Mailchimp For WP.
    Hope this will serve your purpose.

    Thanks!

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    Hello,

    Please Follow below steps:

    Step:1
    Go to admin > appearance > menus
    Click on Screen Options (top right of the screen)
    Check the CSS classes options in the “Show advanced menu properties” panel
    create custom link menu with # url, label Newsletter and class fa fa-enevelope mailchip-newsletter-button and save

    Step:2
    Put below code into your current theme’s functions.php file located at wp-content/themes/Your current theme/ folder.

    function my_mailchip_popup_custom_script(){
    echo 'jQuery(document).ready(function($){';
      echo '$("".mailchip-newsletter-button"").click(function(){ $("".mailmunch-popover"").attr(""style"",""display:block !important"");';
      echo '$("".mailmunch-overlay"").attr(""style"", ""display:block""); });';
    echo '});';
    }
    add_action( 'wp_footer','my_mailchip_popup_custom_script' );

    Hope it work for you. If any query let me know.

    Thread Starter dashr17

    (@dashr17)

    @addweb-solution-pvt-ltd – ah, thanks so much! Unfortunately didn’t work though. The envelope icon currently hovers above the ‘newsletter’ title, despite the fa-envelope thing, and the functions.php code doesn’t seem to have worked.

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    @dashr17,

    Please change below function into your current theme’s function.php page (i.e. Step:2)

    
    function my_mailchip_popup_custom_script(){
    echo '<script type="text/javascript">';
    echo 'jQuery(document).ready(function($){';
      echo '$(".mailchip-newsletter-button").click(function(){ $(".mailmunch-popover").attr("style","display:block !important");';
      echo '$(".mailmunch-overlay").attr("style", "display:block"); });';
    echo '});';
    echo '</script>';
    }
    add_action( 'wp_footer','my_mailchip_popup_custom_script' );

    Hope it work for you. If any query let me know.

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    @dashr17,

    Please change below function into your current theme’s function.php page (i.e. Step:2)

    function my_mailchip_popup_custom_script(){
    echo '<script type="text/javascript">';
    echo 'jQuery(document).ready(function($){';
      echo '$(".mailchip-newsletter-button a").click(function(){ $(".mailmunch-popover").attr("style","display:block !important");';
      echo '$(".mailmunch-overlay").attr("style", "display:block"); });';
    echo '});';
    echo '</script>';
    }
    
    add_action( 'wp_footer','my_mailchip_popup_custom_script' );

    Hope it work for you. If any query let me know.

    Thread Starter dashr17

    (@dashr17)

    @addwebb-solution-pvt-ltd – amazing! that works! thank you! But there’s still the problem with the navigation bar: as you can see, it says newsletter and then has the icon over it. I would ideally like the icon to be next to the social media ones. Any idea?

    Thread Starter dashr17

    (@dashr17)

    @addwebb-solution-pvt-ltd – Ah, the only thing is that the cross doesn’t work so you can’t close the pop-up. Any ideas?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding newsletter subscribe icon to nav bar’ is closed to new replies.