WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
[resolved] How to add a subscribe button on ad listing page (10 posts)

  1. nims
    Member
    Posted 12 months ago #

    I am using custom post type ad_listings to display classified ads that users post. I have read FAQ and implemented the custom_post_type and custom_taxonomy code in functions.php
    I need an option to subscribe users to the custom category they are posting the ad in. How can this be done.

    http://wordpress.org/plugins/subscribe2/

  2. mattyrob
    Member
    Plugin Contributor

    Posted 12 months ago #

    @nims,

    I'm sorry, I don't understand your question.

    "I need an option to subscribe users to the custom category they are posting the ad in."

    So who makes the post? A post is made by a single account normally. Are you talking about people who follow up with a comment?

  3. nims
    Member
    Posted 12 months ago #

    I am using a theme for posting classified ads. I have category cars and sub-categories as car makers. Now if some user wants to post an ad under cars->Honda I need this user to be able to subscribe to this sub-category Honda. This would enable him to get updates regarding other ads posted in this sub category.

  4. mattyrob
    Member
    Plugin Contributor

    Posted 12 months ago #

    @nims,

    Okay, I think I understand, so the user who posts the ad under Cars->Honda is a registered user with a WordPress user account, they can add the subscription in their Subscribe2 profile.

    There isn't a way to have this done automatically without some very site specific custom code. You could add a link through to their profile perhaps but is seems that this would need to be done on the advert authoring page.

  5. nims
    Member
    Posted 12 months ago #

    I know I need to customize the theme files a bit. I will try to edit the ad-posting file of the theme to add a checkbox to subscribe that category. Just wanted to know what code needs to be put that would subscribe him to that particular category.

    The problem is that this theme uses front end posting, so I don't think the user will see subscribe options page as the backend access is disabled. FYI I am using classipress, if that helps.

  6. mattyrob
    Member
    Plugin Contributor

    Posted 12 months ago #

    @nims,

    You'll need to find a way to identify the category ID and then add it to the list as stored in the usermeta table for that particular user ID.

    Have a look at the code in the admin/your_subscriptions.php file to see the usermeta keys you'll need to update (s2_cat{#ID} and s2_subscribed).

  7. nims
    Member
    Posted 12 months ago #

    or if you could tell me how can I add a button on category pages so that registered logged-in users can click to subscribe that category.

  8. mattyrob
    Member
    Plugin Contributor

    Posted 12 months ago #

    @nims,

    It's going to be the same type of fix as described above, code your button and tie the input to a PHP function script that takes the category ID and the user ID and then updates the usermeta table keys listed above.

  9. nims
    Member
    Posted 11 months ago #

    Can you help in providing the code. Its bit confusing.
    How does it work at the moment in normal case ?

  10. mattyrob
    Member
    Plugin Contributor

    Posted 11 months ago #

    @nims,

    The code you need will be an adaption of the form processing in the admin/your_subscriptions.php file.

    Sadly, I don't have enough time to dedicate to solving individual site issues. If you are stuck consider asking for assistance on WP Jobs.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.