How can I make a custom widget for subscription forms in WordPress?

Amber January 15, 2012
Pinterest Stumbleupon Whatsapp

How do I make a custom widget that

1) can include anything I want (not specifically posts or pages), for example either an ad, or a “call now for a quote” kind of box?

2) that can accept/post subscription forms like AWeber?

Ads by Google

  1. Amberjalink
    January 16, 2012 at 1:56 pm

    Thanks - but that doesn't help. (Self hosted) - unfortunately it looks like the site cut OFF part of my question. I know how to do a widget. I wanted to know how to do it code-wise, so that the widget appears in the widgets list on install of the theme every time. (i.e., if I wanted to install the theme on many sites and have the same widgets, I'd like to preload them to save work).

    • James Bruce
      January 16, 2012 at 5:01 pm

      Are you coding your own widget via a plugin? In that case, just add the widget code to the themes functions.php file instead, and it will automatically appear every time the theme is used as you want. 

      • Amberjalink
        January 16, 2012 at 5:08 pm

        Thank you!

  2. Sahil Dave
    January 15, 2012 at 10:09 am

    In wordpress.com websites you can add simple HTML codes as a widget to your website by going to Appearance > Widgets.

    From there you can add a TEXT Widget and write some codes in it to work.

    I had added a Image through HTML code to redirect the user to my Facebook Like Page. 

  3. James Bruce
    January 15, 2012 at 9:42 am

    1. If you're using WordPress.com, that's impossible.

    2. If you're using a self hosted WordPress.org install, that's incredibly easy by just adding a text widget to wherever widgets are supported in your theme. 

    Sounds like you're with the former?