WordPress.org

Forums

MailChimp Widget
[resolved] Please help me customize mailchimp widget (13 posts)

  1. RisonSimon
    Member
    Posted 4 years ago #

    Hi, I would like to customize the mailchimp widget. The widget is a part of 'mailchimp widget' plugin. I want it to customize it like twohourblogger.com sidebar. How do I do this? The plugin files makes no sense :) Thanks.

  2. jameslafferty
    Member
    Plugin Author

    Posted 4 years ago #

    Hi RisonSimon,

    Twohourblogger.com isn't using my widget. From what I can tell, Martyn seems to be using a text widget, with MailChimp's form code pasted in... Of course, I could be wrong.

    To customize the look of my widget, you'll want to use css. The class for the widget is widget_ns_mailchimp. I'm using label and text input elements... no paragraphs, divs or spans. The idea is that the theme should be taking care of appearance, and the widget should just be adding in functionality.

    Hope that helps somewhat at least.

    Cheers,

    James

  3. RisonSimon
    Member
    Posted 4 years ago #

    The truth is I don't see any css files in plugin editor. All I see is come php files and javascript files.

  4. jameslafferty
    Member
    Plugin Author

    Posted 4 years ago #

    That's because they're not there.

    The css is controlled in your theme, not in the plugin.

    J.

  5. RisonSimon
    Member
    Posted 4 years ago #

    What if I wanted to add some text before fields? How do I do that?

  6. jameslafferty
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Rison,

    A cautionary note:

    If you do edit the plugin files, you may not be able to upgrade in the future.

    What to edit:

    /lib/ns_widget_mailchimp.class.php l.276

    $widget = $before_widget . $before_title . $instance['title'] . $after_title;

    You can echo out whatever html you need, or you can break out of php and just insert the html, something along the lines of:

    $widget = $before_widget . $before_title . $instance['title'] . $after_title;
    
    ?>
    <p>My super cool message here.</p>
    <?php

    Hope that helps!

    James

  7. RisonSimon
    Member
    Posted 4 years ago #

    Hi, thanks for that tip. But the problem is that now the message appears before the title. I want the message to appear between the title and the forms. Thanks for your time.

    Hopefully on your next update you will include a way to add text right from the plugin dashboard. Also ability to customize and can you centralize the the forms? Thanks.

  8. jameslafferty
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Rison,

    My bad... I wrote that a bit quickly.

    What you need to do instead is:

    $widget = $before_widget . $before_title . $instance['title'] . $after_title;
    
    $widget .= '<p>My super cool message here.</p>';

    I don't currently have any plans to add that functionality, or any look customizations in the plugin. The philosophy behind this is that the plugin should be very simple, and provide only the functionality that is absolutely needed. If I get lots and lots of requests, that might change my mind, but for now, I'm going to stick with the minimalistic approach (so as to avoid feature creep).

    Cheers,

    James

  9. RisonSimon
    Member
    Posted 4 years ago #

    wow. It worked! Thanks for your time James. Hope to see you with more plugins. And is it possible to control the size of forms and make it like this:
    First Name :
    Email Address:
    and not
    First Name:
    Email Address:
    and
    possible centralize join now button?

    If these were possible I think this post can helpful for a lot of people in the future too who would like to customize your plugin. Thanks for your time.

  10. thewest3
    Member
    Posted 4 years ago #

    Maybe I am missing something easy, but I am trying to list the subscribe button just to the right of the email entry box. I have turned of custom styling, and for whatever reason it really wants to center below. I tried moving the <div> that contains the button, but that just made the button disappear.

    The site in question is here: http://thewest3.com/

    Thanks for any help you can provide.

  11. jameslafferty
    Member
    Plugin Author

    Posted 4 years ago #

    Hi thewest3,

    The plugin you're using isn't mine. It's mc_jesse's plugin, which can be found at this url: http://wordpress.org/extend/plugins/mailchimp/

    Try asking there for support on your issue, and good luck in getting it resolved!

    Cheers,

    J.

  12. jameslafferty
    Member
    Plugin Author

    Posted 4 years ago #

    RisonSimon,

    Could you show me a url to look at? If you could, I might be able to help out with the css to style the form appropriately.

    Cheers,

    James

  13. RisonSimon
    Member
    Posted 4 years ago #

    Thanks for your help James. I have tweaked the mailchimp code to my liking. Thanks for your help. Great work with your plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • MailChimp Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic