Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Miguel Useche

    (@skatox)

    You’ll need to hack it. On the get_categories functions, you’ll need to pass your current types on the type params. I’ll add support for this on next version.

    Thread Starter yoyoma1974

    (@yoyoma1974)

    I thought get_categories doesn’t let you specify custom posts.

    Plugin Author Miguel Useche

    (@skatox)

    Sorry, you can specify it by altering the SQL code in the plugin.

    Thread Starter yoyoma1974

    (@yoyoma1974)

    That’s a bit beyond me. Any idea when the next version will be released?

    Tim

    Hi Miguel,

    I’m having the same issue. My plan is to display an archive list of a custom post type. Could you give me some advice of where and how to modify the get_categories function?

    Thanks in advance,

    Josep

    Plugin Author Miguel Useche

    (@skatox)

    Hi, according to:http://codex.wordpress.org/Function_Reference/get_categories you must add type parameter to the array. So in the line 244:

    get_categories(array('type'=>'YOUR_CUSTOM_TYPE','child_of' => 0, 'hide_empty' => 1, 'hierarchical' => 1, 'taxonomy' => 'category'));

    Also you need to replace every post_type = 'post' along the file with post_type = 'YOUR_CUSTOM_TYPE'

    Just replace YOUR_CUSTOM_TYPE with your type. And it will work.

    This is my top priority for next version, whenever I find time or receive some donation I’ll work on this.

    That works really well thanks Miguel.

    I have a slightly more complex implementation of custom posts and wondered if you could help with some advice.

    1. I have two custom post types so I need to look at recoding your solution to allow for that. Any advice on the simplest way to handle this?

    2. The initial custom post i have this working for sits under a permalink set in register_post_type in functions.php like so

    'rewrite' => array('slug' => 'events')

    However the links generated by the widget don’t pick this up. I could hardcode in the permalink but again this would only solve things for one of my custom post types.

    Be grateful for any help.

    Thanks,

    Rich

    Plugin Author Miguel Useche

    (@skatox)

    Thanks for using it.

    1. To allow multiple types you should add a new option, so you can select which custom post to use. You can copy the title option to modify to put you custom post manually (or using a dropdown)

    2. I’ll need to fix that for next version, plugin should use WP’s registered slug. So, if you hack it, i hope it won’t get damaged by any update.

    PD. You can send me patches if you implement this stuff, so others can have access to this.

    Hey, yes, I managed to hack together a modification to handle the first issue I had with the plugin, and I’ve been using a piece of code in my themes functions.php file to correct the URL’s using rewrites for the second.

    Happy to send you the modified file if it’s going to be any help to you and other users – what’s the best way to do that?

    Plugin Author Miguel Useche

    (@skatox)

    Nice 🙂 i’ll be releasing a new version next month. You can mail me at:
    migueluseche(dot)skatox(dot)com

    Tell my if you want to put you in the credits at the changelog.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Creating Archives For Custom Post Types’ is closed to new replies.