Support » Plugin: Subscribe2 » Allow user to select category on signup

  • Resolved


    Hey all,

    I currently have a site with two different user signups and I’d like to integrate the two. You can see my signup form at

    This form submits the person who signs up as a wordpress user and therefore to all blog categories (save the one that is not allowed by subscribe2), so my question is is there any code that I can insert into my form – a subscribe2 function maybe that will allow my users to select their categories in the singup? Rather than after they become members. I have sifted through the code, but just can’t figure it out.

    Any Help is appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • @c.ostmo,

    You’d have to access the global variables $mysubscribe2 and then use some of it’s functions like the display_category_form(). Finally, you’d have to process the information and add it into the database with the core function update_user_meta and the Subscribe2 table name filter get_usermeta_keyname().

    Possible, but it’ll take some figuring out, try looking at the admin.your_subscriptions file for some pointers as all the same data are processed in that file.

    Thanks mattyrob. I figured it was something like that. I was just having trouble figuring out exactly how to do it. Thanks for the info though…I have another question, but I guess I’ll start a new thread for it.

    Hey I am a little lost here. I know this is a lot to ask, but perhaps you can help me?

    I’m kind of a newb when it comes to this kind of stuff and I’ve been posting on forums, but can’t seem to get a clear answer.

    In trying to get my form to submit to subscribe2’s categories, I have written

    global $wpdb;
    $user_ID = $wpdb->get_var($wpdb->prepare(“SELECT ID FROM $wpdb->users WHERE user_email = %s”, urldecode($_GET[’email’])));

    and later on

    update_user_meta($user_ID, $this->get_usermeta_keyname(‘s2_autosub’), $_POST[‘new_category’]) = $newsletter->normalize_name(stripslashes($_REQUEST[‘hms’]));

    The second part of this is the same code used to insert fields like name and email address into the database from the plugin “newsletter”. I know it is a lot to ask, but I am kind of desperate. With this code, I get the error: “Fatal error: Can’t use function return value in write context in etc..etc..” What do I do?


    I’m not sure what you are trying to accomplish in that second code snippet but update_user_meta() is a function, it cannot be declared = to anything.

    Also, you are apparently trying to over write the auto subscribe key with a category name instead of updating the s2-subscribe CSV string and also create a category meta_key and value with the category ID like s2_cat’n’ = ‘n’ where ‘n’ is the category ID integer.

    Thanks for the quick response. Alright, I’m not sure what I’m trying to do either…I’ll keep working on it.

    Have you ever used this plugin: I’m a little afraid to buy it because I’m not sure if it will do what I want.


    I haven’t used it personally but I’ve recommended it and not had any negative comments about it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Allow user to select category on signup’ is closed to new replies.