WordPress.org

Ready to get started?Download WordPress

Forums

Pull Subscribe2 code to the sidebar - Help Please! (24 posts)

  1. Tri-Fusion
    Member
    Posted 7 years ago #

    I just downloaded the latest version of Subscribe2 plugin but wonder if anyone knows how to put the subscribe box on the sidebar instead of creating a new page?

    Thanks a lot

  2. Samuel B
    moderator
    Posted 7 years ago #

    Once the plugin is activated it should be as simple as putting this:
    <!--subscribe2-->
    in sidebar.php.

  3. Tri-Fusion
    Member
    Posted 7 years ago #

    It doesn't work

  4. Ovidiu
    Member
    Posted 7 years ago #

    no it does not, any more suggestions?

  5. Miroslav
    Member
    Posted 7 years ago #

    If your theme is "widgetized", you can accomplish what you want by installing the Subscribe2 Widget:
    http://www.prescriber.org.uk/subscribe2.php
    (Scroll to the second half of the page.)

    However, if anyone has any ideas how to do this for non-widgetized themes, I would love to hear about it, too!

    Btw, you will want to create a separate page for Subscribe2 in any case so that your registered users can modify their subscription preferences.

  6. Miroslav
    Member
    Posted 7 years ago #

    Above, I posted a way to include the Subscribe2 subscription form in the sidebar of any widgetized theme.

    Does anybody know how to include the same in the Sidebar for themes that don't use widgets?

  7. aadil
    Member
    Posted 7 years ago #

    For non-widgetized page templates, I think that you will need to add a PHP line directly in the sidebar file.
    For example,

    <br><br><h2>Example</h2>
    <ul><?php sidebar2(); ?></ul>

  8. Miroslav
    Member
    Posted 7 years ago #

    Thanks, aadil! Will try it out... :)

    Are you sure it's <?php sidebar2(); ?> and not <?php subscribe2(); ?>? I couldn't find any sidebar funtion inside the plugin file.

  9. aadil
    Member
    Posted 7 years ago #

    I just gave it as an example, in fact I don't even know the correct function name to call. I only know the syntax.

    I think the plugin file should help in determining the correct function to call.

  10. Miroslav
    Member
    Posted 7 years ago #

    I just gave it as an example, in fact I don't even know the correct function name to call.

    Oh, OK! Anybody out there who knows which function to call? Thanks! :)

  11. xinfo
    Member
    Posted 7 years ago #

    even i am looking for this for a long time but i have seem many blog have the subcrive plugin in there side bar hope some one post it here

  12. Miroslav
    Member
    Posted 7 years ago #

    Nobody knows which function to call in order to pull the Subscribe2 subscription form to the sidebar menu for non-widgetized themes?

  13. mattyrob
    Member
    Posted 7 years ago #

    You may want to head here:

    http://subscribe2.wordpress.com/2006/09/08/sidebar-subscribe2-without-a-widget/

    I look after the plugin now and I have a poll on about this very thing!

  14. Miroslav
    Member
    Posted 7 years ago #

    Hi MattyRob,

    Thanks! I have placed my comment (in favor of publishing the unsupported method).

    I fully appreciate the fact that you are using your own time to support/update this great plugin after skippy dropped it and I am sure I am not the only one who is eternally grateful for that.

    However, what I don't understand is why don't you just post the way to include Subscribe2 into sidebar without the widget and just be done with it?

    As far as the Subscribe2 plugin, putting it in the sidebar for non-widgetized themes seems to be the most frequently asked question and there are plenty of reason why somebody might not want to use widgets.

    Of course, nobody expects you to support things you don't want to support, but you can save yourself lots of frustration by answering this question once and for all.

  15. Miroslav
    Member
    Posted 7 years ago #

    Matty, your poll results seem to be quite unanimous in wanting also the non-widgetized version. Do you have any plans to release it (supported or not)?

  16. Miroslav
    Member
    Posted 7 years ago #

    FYI, Matty just posted the non-widget Subscribe2 solution to his blog.

    Here's the code he recommends:

    $content = apply_filters('the_content', '<!--subscribe2-->
    ');
    echo $content;

    I am going to give it a try and report back.

  17. Miroslav
    Member
    Posted 7 years ago #

    I am going to give it a try and report back.

    Worked fine! Thanks, Matty! :)

  18. rudiegirl
    Member
    Posted 7 years ago #

    I just used that same code in my sidebar but it doesn't work correctly. The apply_filters function calls more than just the subscribe2 code - it also calls code for any other plugins that are running on the page. Is there a way to either exclude the other plugins or use something besides apply_filters? Otherwise this is no good to someone (like me) who uses more than one plugin.

    Check my page at http://www.ktuh.org/sovery
    You can see that it is pulling in the code for podpress too.

    Thanks.

    By the way, it doesn't matter if I use the widget or not. I get the same result either way.

  19. Tri-Fusion
    Member
    Posted 7 years ago #

    Awesome!

  20. ladydelaluna
    Member
    Posted 7 years ago #

    Okay, at the risk of sounding like a dolt - what's the exact syntax for this? I'm still trying to find the time to learn PHP for this very reason... but I'm smart enough to know that this doesn't work as it's posted... Is it just <?php ...all that stuff... ?> or am I off here?

  21. ladydelaluna
    Member
    Posted 7 years ago #

    Nevermind - that was it. It just didn't work the first 3 times I tried it that way! :)

    <?php $content = apply_filters('the_content', '<p><!--subscribe2--></p>'); echo $content; ?>

    (Just to make it clear for anyone else...) :)

  22. dopecoder
    Member
    Posted 7 years ago #

    Worked for me. Many Thanks!

  23. dopecoder
    Member
    Posted 7 years ago #

    hi again, actually it only works on those pages that have no content. The line echo $content; is causing me some problems as it bringing across other plugins i.e my socail bookmarks onto the sidebar. I am having the same problem as rudiegirl. Any help is appreciated.

  24. dopecoder
    Member
    Posted 7 years ago #

    Ok i gave up with subscribe2 and found an even better plugin that does allow the form onto the sidebar. I'm now using WP PHPList which is a fantastic wordpress plugin. In order to use it you also need to install PHPList - it's an open source mailing list manager which i got from my web hosting cpanel - you could get it thru browsing the search engines. You can see a demo of this on my site http://bloggerholic.com

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags