Custom Post Types and the DCG

Dynamic Content Gallery screenshotUnless you have been living under a rock in the middle of nowhere, the chances are that you have heard about WordPress Custom Post types.

Although already available in WordPress 2.9, there was very little documentation available, nor as much functionality as one would like in order to use them in many use cases.

Since then, the WP development team have made huge strides concerning Custom Post types and, happily, WordPress 3.0 makes them more accessible and easier to set up and use.

If you’re not very familiar with Custom Post types, the resources listed below give a good overview of how they work and how to use them:

Please note that Custom Post Type support was added to the Dynamic Content Gallery with the release of version 3.3 on 14 September 2010. Therefore, the rest of this article is out of date!

DCG and Custom Post types

Currently, my Dynamic Content Gallery plugin does not support Custom Post types. What this means is that you can’t display Custom Post “posts” in the DCG (only normal Posts and Pages). As I firmly believe that many WordPress users will, in the future, use Custom Post types, I feel that the DCG should be able to work with them and that I should factor this in to a future DCG release. The problem is that the solution to do this is not so simple, for the following reasons:

  • Custom Post types can be named anything (they’re Custom, right?)
  • Admin “support”, ie which normal Post features are available to Custom Post types, is entirely up to you (there’s little by default, it has to be added using add_post_type_support.)

Although none of the above is a real headache, the DCG would need to be able to cope with the wide variety of Custom Post types setup that will be out there. Which brings me to the point of this post…

How will you use Custom Post types?

That’s the question. Will you use them to create lots of different types of content on the same site? How would you like to use Custom Post types with the DCG? Alone, or with a mix of various Custom Post types, Posts and Pages? Your answers to these questions will be very useful to me, so feel free to leave a comments and suggestions below.



  1. Neemias says:

    Thanks! You saved me! I tried using the plugin Featured Gallery, but I worked the whole time in the morning and I was not abble to configure. So I found your website. Thanks again. Ah, I am brazilian.

  2. Hi, i download Dynamic Content Gallery and installed on wordpress 2.9.2, my theme is Wire-News..

    In my homepage I have one error, Normally I have menu with submenus, that its my category (hoteles – 3 estrellas, 5 estrellas example…), when i finish to install your plugin, it don´t work propertly, If I pick any option to access it´s ok and my website works good..

    Do you have any suggest for fix this problem..

    pls.. visit , HOTELES don´t shows my options. but you do click..

    start of here it´s wotks normally, now you can click >Hoteles >3 estrellas > etc…

    help me please.. 🙂

    • No support questions here please!

      Please use the Support Forum – that’s what it is there for. Thanks.

  3. Benjamin Mueller says:


    I have been upgrading our WordPress theme for the Web Design company I work with and with the release of WP 3.0 I created Custom Post Types for all of our content. We have been using the DCG Plugin on all of our sites for our homepage slideshow and in order to use it with the new WP 3.0 Post Types I needed to find a workaround for displaying those posts.

    So what I have done is added to your code and created a Custom Post Type section for the Gallery Method. I went ahead and also added a section so that you can choose the Category from that Post Types taxonomy. So if you had a Post Type for instance “Properties” and had a Category named “Slideshow” under that Post Type you could choose the Slideshow Category and all posts placed under that Category would be displayed.

    I havent been able to do much testing on my changes to make sure it works under many different circumstances but hopefully over the next few weeks as it is placed on our sites I will have more time to do that. If you would to take a look at my code I would be more than happy to send it to you just let me know.

    Benjamin Mueller

    • Benjamin,

      Thanks! Yes, please, I’d love to see what you’ve done. You can send me the file to info at




    • Huge thanks and kudos to Benjamin, who kindly shared his code with me – most of which made it into DCG version 3.3 – which saved me a heap of time and effort. Much appreciated!

      Cheers, Benjamin! 🙂

  4. Hello,

    First of all, thanks for these plugin.
    imho the support to custom post types should also be added in the “ID Method Settings”. So instead of a single string for all the posts you want to be shown, each new post you want to add to the dcg should have ID+custom-type (a drop-style-select showing the custom post types that you have would be nice).

    The management behavior has very similar needs to the one used when adding custom fields in a post.

    I think that this plugin does its job very well, but sometimes, people has different needs, adding the option of CPT at the “id method” would be more than enough to fullfill these “extra” needs.

    Just my five cents, thanks for reading and for your hard work.

    Best wishes! 😉

    • Hi,

      Thanks for your comments.

      The ID Method can use posts, Pages or any custom post type. All you need do is use the relevant ID number.

      I appreciate that it takes a little more effort on your part to find the ID’s (though there are a couple of great plugins which display the ID number in the posts screens), but I’m reluctant to add a complex interface for something that is not frequently updated.


Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


+ four = 12