Support » Plugin: Organize Series » [Plugin: Organize Series] Custom Post Types

  • Hey there,

    I am using Organizing Series in my blog and am quite happy with it. Single but most annoying problem: The plugin does not work for custom post types. Given a post type „foo“, I added a copy of the orgseries_add_meta_box() to orgSeries-admin.php reading orgseries_add_meta_box_foo and added the action-trigger in the same file:

    function orgseries_add_meta_box_comics() {
    	global $orgseries;
    	add_meta_box('seriesdiv', __('Series', $orgseries->org_domain), 'series_edit_meta_box', 'comics', 'advanced', 'core');
    	remove_meta_box('tagsdiv-series', 'comics', 'advanced'); //removes series meta box added by WordPress Taxonomy api.

    Result is the series meta box showing up in post edit for the foo-post type, but any input results in no markup at the front-end.

    Best Regards,

Viewing 12 replies - 1 through 12 (of 12 total)
  • it’s only enabled for post post-types by default.


    Is there any possibility I could enable the functionality to Pages, and not just Posts?



    of course its possible. You just need to make sure the series custom taxonomy registration is modified so that it registers for pages as well. The beauty of opensource is you can go in and customize the code any way you want.

    However, there are other things here and there that will need to be modified as well (some custom queries that only search the post type will need to include the page type as well).

    @nerrad, i’ve made adjustments to the source code to include both pages and a custom post type i’ve generated. the archive page for listing a “series” lists all the series posts (ie: /series/my_new_series/) however the meta information and in-post series list/navigation is not “grabbing” the series. as far as i can tell it’s the get_the_series() function that uses the wp_get_object_terms() WP function…

    for instance, if i have a series within a custom post type, when i go to a post within the series, it shows the navigation for the series, but only the series name, not the posts/pages (in the unordered list).

    also in the meta, every entry shows “part 1 of ##” regardless of what number it is in the series (i can’t get the series number to update in the metabox either… always shows “1”).

    terms seem to be updating OK in the database but i am clearly missing some pieces to this puzzle. any pointers would be greatly appreciated.

    Just popping in to say I’ve seen your post @rags02. Unfortunately, I’m swamped with work for clients right now and I can’t offer any free support on this at the moment. If there was something that immediately came to mind I’d offer it up here but I’d have to do some digging which I don’t have time for. I love it that you’re giving it a go though!

    one pointer I will give. You will want to look for anywhere OrgSeries is doing a custom query and make sure it’s not limiting it to the post post-type (including defaults).

    another pointer,
    There are lots of hooks and filters built-in to Organize Series that should enable you to add in the extra functionality without messing with the core files. I suggest doing things that way so future updates of Organize Series won’t mess up your work 😉

    If you need to do something that doesn’t have a hook or filter for it let me know and if I think it’s valid I’ll add it to the list of updates for OrgSeries.

    thanks for checking in and for the few pointers. yup, doing my best to not touch your core files so updates aren’t an issue. i thought the issue might be in the default arg’s for some of the WP taxonomy queries, but so far, that’s not the issue. whatever i find i’ll post here for other users and for your reference. great code btw… easy to read/navigate… well commented and very logical.

    So far in orgSeries-utility.php, line 49…

    $args = ‘post_status=any&include=’.$postids;

    $args = ‘post_status=any&include=’.$postids.’&post_type=any’;

    … this allows for the inline nav list, meta data in posts, and the “Series Part” within the metabox to all function correctly. Hmmm…. maybe if query_posts() was used instead of get_posts(), the get_series_order() function could include the $args (array) as a param and would be a bit more welcoming for custom post types. Or do something similar to your get_series_ordered() function which is very accommodating for query options…

    I’ve noticed a couple other random quirks with custom post types and will update as I find solutions… hopefully helps someone else out there.

    great stuff. keep posting anything you find and I’ll make modifications to the core for anything that makes sense in the next version. I’m going to have to release a new version with WP 3.3 so hopefully most mods can make it into that release.

    I’ll plus one the request for Organize Series / Custom Post Type integration. I happen to be a premium OS member so will keep watching for updates there as well.


    I’ll plus 2 that request 🙂

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Organize Series] Custom Post Types’ is closed to new replies.