• Hi, I am at a really difficult stage of completing my website.
    What I am after is the ability to subscribe to a taxonomy term used on the post, rather than the post itself. Then whenever this Taxonomy term is used in any other post type to then email that post if subscribed.

    I can see options in the API to register to the entire Taxonomy terms but I am simply after the specific one I used on that post which then globally groups post types under that one term.

    For example Movie title would group all articles movies/squeals/prequels, promotional articles and so forth.

    The Term would avoid mass irrelevant spam and allow specific choices by my readers. Thanks in advance.

    https://www.ads-software.com/plugins/subscribe2/

Viewing 10 replies - 1 through 10 (of 10 total)
  • @matthew,

    Subscribe2 allows category (or taxonomy) specific subscription preferences only to Registered Subscribers. Subscribe2 also supports ‘Public Subscribers’. To learn about the difference read here:
    https://subscribe2.wordpress.com/support/faqs/#16

    I suspect you may be able to configure what you need with Registered Subscribers but for that all of your readers need to register as Users on your WordPress site.

    Thread Starter Matthew O'Donnell

    (@serpream)

    Thanks for the quick reply.
    I read all that yesterday but might be I might still be abit confused.
    To better clarify, If they registered then selected say term ‘Sonic the Hedgehog”, Every article which has that term will be emailed per my setup (such as daily/weekly)?

    If so that is exactly what I require.

    @matthew,

    Ah, I see. You want to use ‘tags’ and not ‘categories’.

    I think that it is possible by using the ‘s2_taxonomies’ filter in Subscribe2. This filter is intended to allow users to register custom taxonomies for inclusion in Subscribe2 emails but it could also be used to drop support for categories and enable it for terms instead. The API is documented here:
    https://subscribe2.wordpress.com/support/api/

    I think you would need (untested) code like this:

    function my_taxonomy_types($taxonomies) {
        $taxonomies = array('post_tag');
        return $taxonomies;
    }
    add_filter('s2_taxonomies', 'my_taxonomy_types');

    Thread Starter Matthew O'Donnell

    (@serpream)

    Yeh been giving this a go past hour or so. Options are appearing in the admin which is cool, but not on dummy account I am using to subscribe. Don’t understand why it wont give the subscriber the choices as shown in admin.
    Mind bending when I worked first time then options vanished.
    The other issue I can see is they are not grouped when choices are offered and presented in a wall of titles which can be instantly overwhelming.
    Also got Uncategorised appearing twice in admin, but again no options offers to subscriber.
    But at moment as I cannot get options to appear despite everything set correctly I am left at a loss however did just do the WordPress 3.9 update which might explain behavior.

    *Edit* Hit the reset and suddenly everything worked. Only issues I got left is:
    1)To see if I can create a button that automatically subscribes the user to the term used on the post. Many thanks for help and great plugin.
    2)Group the subscription tags under a Title to keep the multiple taxonomies grouped and separate.

    @matthew,

    Strange, it might have been some server or browser caching but at least is was resolved by a reset.

    Grouping the tags might be difficult as they are not hierarchal like categories as far as I am aware.

    The button shouldn’t be too difficult, added the current user details if lofted in (maybe only show the button if logged in too), then collect the tags on the post and hide them in the form with the button. On clicking the button that data can be used to subscribe that known user to the post tag.

    Thread Starter Matthew O'Donnell

    (@serpream)

    Select / Unselect All
    Killzone: Shadow Fall
    Sonic Lost World - Deadly Six Edition
    Sonic Lost World 3DS
    Sonic Space Migets
    Sonic the lost world
    Super Mario 3D World
    gdggsgdfhdghnvbnvbnhffgvbnvbnvnfgghbfdhf
    Killzone
    Sonic the Hedgehog
    Super Mario
    Nintendo 3DS
    Sony ? Playstation 4
    Sony
    Wii U
    First Person Shooter
    Platformer

    Thats how they are mashed at the moment. When something like:

    Game Titles:
    Killzone: Shadow Fall
    Sonic Lost World - Deadly Six Edition
    Sonic Lost World 3DS
    Sonic Space Migets
    Sonic the lost world
    Super Mario 3D World
    
    Game Series:
    gdggsgdfhdghnvbnvbnhffgvbnvbnvnfgghbfdhf
    Killzone
    Sonic the Hedgehog
    Super Mario
    
    System Format:
    Nintendo 3DS
    Sony ? Playstation 4
    Sony
    Wii U
    
    Genre:
    First Person Shooter
    Platformer

    That is more what I am after. Otherwise is a exetrmely short time it is going to turn into a gigantic wall of mess.

    function my_taxonomy_types($taxonomies) {
        $taxonomies[] = 'games_titles';
    	$taxonomies[] = 'gaming_series';
    	$taxonomies[] = 'system_formats';
    	$taxonomies[] = 'gaming_genres';
        return $taxonomies;
    }
    add_filter('s2_taxonomies', 'my_taxonomy_types');

    That is how they are being added so surely there must be a way to inform Subscribe2 to treat them as separate boxes/groups under a header? Also 'hierarchical' => true, is part of the taxonomy setups I use and have no problems using them before. It seems to be the code Subscribe2 uses to add them to the options mashing them together without care ?? Anyways been a long day and I appreciate the help. Hopefully tomorrow I can crack it or find a better way to add them to the plugins options.
    Thanks again as 70% is better than 0%. Once I sort the groups out the rest should be simple.

    @matthew,

    Since you are using different taxonomies then they are being merged. Have a look at the all_cats() function in the class-s2-core.php file for how the taxonomy data is collected (it’s ordered by ‘slug’ as default). Also, the display_category_form() function in the class-s2-admin.php file is used for generating the check box listing. That might be useful to you also.

    I you create a hack that is scalable to the core code let me know and I can review it for inclusion in the next version.

    Where did we get with this?

    Thread Starter Matthew O'Donnell

    (@serpream)

    Oddly I did have a solution, and I swear I even posted it in this topic as it is now marked as resolved. I am currently extremely confused but will go back through my notes as I had a working solution.

    Thread Starter Matthew O'Donnell

    (@serpream)

    Found it finaly!

    All code is inside that. No idea if it has been added to core add on files yet or requires the hack every update.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Possible to Subscribe to Post Taxonomy Term and email when term is used?’ is closed to new replies.