Viewing 11 replies - 1 through 11 (of 11 total)
  • @duke,

    Yes. See theAPI documentation.
    http://subscribe2.wordpress.com/support/api/

    Thread Starter Duke

    (@davidsons)

    Thanks, where does that code go? Running multisite and want people to subscribe to custom posts on subsites. Does that code go in the plugin or the functions.php of the theme? Exact placement please.

    Thanks

    @duke,

    Either location is fine but bear in mind if you place code in functions.php it may be lost on updates.

    Thread Starter Duke

    (@davidsons)

    Okay, I added the following lines of code to the subscribe2/subscribe2.php file starting just above the line that reads…

    // our version number. Don’t touch this or any line below
    // unless you know exactly what you are doing

    function my_post_types($types) {
    $types[] = ‘event,listing’;
    return $types;
    }
    add_filter(‘s2_post_types’, ‘my_post_types’);

    and…

    function my_taxonomy_types($taxonomies) {
    $taxonomies[] = ‘event_category,listing_category’;
    return $taxonomies;
    }
    add_filter(‘s2_taxonomies’, ‘my_taxonomy_types’);

    My CPTs are ‘event’ and ‘listing’
    Taxonomies are ‘event_category’ and ‘listing_category’

    When I add the code, I see this on the first settings tab this…

    “Subscribe2 will send email notifications for the following custom post types: Event,listing”

    Hope this is right? But when I go the ‘Registered Users’ tab, shouldn’t it show the CPT categories there? It only shows the post categories, not the CPT categories.

    Thanks

    Thread Starter Duke

    (@davidsons)

    Okay further along…

    I tried it with just one (1) CPT and it’s Taxonomy and it works as advertised. Shows the categories to be selected, but can I add more than one CPT and Taxonomy?

    What would be the code for that?

    I tried ‘event,listing’ for the CPT and ‘event_category,listing_category’ for the taxonomies and it just goes back to just showing only the post categories.

    What is the proper code for displaying more than one (1) CPT and their Taxonomies?

    Tried this too, ‘event_category, listing_category’ with a space in between, but no help.

    Here is my code, correct if wrong….

    function my_post_types($types) {
        $types[] = 'event, listing';
        return $types;
    }
    add_filter('s2_post_types', 'my_post_types');
    
    function my_taxonomy_types($taxonomies) {
        $taxonomies[] = 'event_category, listing_category';
        return $taxonomies;
    }
    add_filter('s2_taxonomies', 'my_taxonomy_types');

    NOTE: When the CPTs and Taxonomies are done stand alone, it works fine, but when trying to combine 2 CPTs and their Taxonomies, it doesn’t show the categories anymore like it does when adding just 1 CPT.

    Does the plugin work with more than 1 CPT, if yes, what would be the right code for it?

    Thanks

    @duke,

    You can’t add individual items to an array like this:
    $types[] = 'event, listing';

    It needs to look like this:

    $types[] = 'event';
    $type [] = 'listing';

    Also, bad idea adding it to an existing plugin file – agin you’ll lose those changes on upgrade – create your own plugin – use Pluginception to make this easier if you need to.

    Thread Starter Duke

    (@davidsons)

    Nevermind, got it by adding extra lines. Thx

    Thread Starter Duke

    (@davidsons)

    How do you get rid of the Ready Graph banner in the plugin list on multisite?

    @duke,

    You probably need to open another thread for that question to get the ReadyGraph developers attention.

    @duke

    Hi, I’ve been researching to fine a ‘publish post to email’ plugin like subscribe2, picked up on your comments on the plugin reviews, and comments on v9.4, and now this thread…

    Are you still using Subscribe2? Or do you recommend a better alternative?

    Appreciate your feedback.

    Thanks
    Mike

    Thread Starter Duke

    (@davidsons)

    @themikec
    The subscribe to email plugin by inscrub at wpmudev works great, but I’ve been using subscribe2 for a long time and learned to code the junk out that they keep adding in to make it work like it’s always been working.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Custom Post Types?’ is closed to new replies.