Forum

Please make sure that you have read the documentation and extensive resources provided on this site before posting your question!

Dynamic Content Gallery Resources

DCG Version 4.0 beta is now available for download and testing. This is a development version and not recommended for live sites. Read more here.

Note that the current stable release of the DCG is version 3.3.5.

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS
Multiple Custom Post Types?
Status: fixed
July 4, 2011
7:07 am
Celeste
Guest

Is there a way to configure the rotator to include regular posts as well as those from multiple custom post types? For example, on our blog (currently in development so I can't include the link, but it's WP 3.1.4 and DCG 3.3.5) we're going to have book reviews, game reviews, movie reviews, etc. as well as various other articles, and each of those review types is a separate custom post type. But from what I can tell, you can only set the rotator up through the admin settings to show either just the regular posts or one particular custom post type. I tried editing the following code in dfcg-gallery-constructors-jq-smooth.php :

if( $dfcg_options['populate-method'] == 'custom-post' ) {
/* Get the Custom Post Type */
$post_type = $dfcg_options['custom-post-type'];

If I change the last line to

$post_type = 'con_book_reviews';

it will show just that particular custom post type, so I assume I'm correct in thinking that's the line that needs to be edited, but I can't manage to make it have an array instead of just the one type. I've tried a few different things but either it doesn't work and only shows regular posts or I get parse errors. Is there something I can do there or elsewhere to achieve the desired result? Thanks so much!

July 4, 2011
7:10 pm
Ade
Admin
Forum Posts: 2493
Member Since:
August 25, 2008
Offline

Hi,

It would take me time to go through the code and check this out. Have you tried specifying post ID's in the ID Method instead? Not as dynamic (you will have to update the ID list each tiem you add a post) but it's a quick workaround.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
July 5, 2011
1:54 am
Celeste
Guest

I haven't, and I figured that would work (that's how our current rotator is) but it would definitely be preferable to have it work on its own. If you're able to check it out, I would definitely appreciate it since your plugin seems ideal in every other way! Thanks so much.

July 5, 2011
6:23 pm
Ade
Admin
Forum Posts: 2493
Member Since:
August 25, 2008
Offline

It's on the to do list. In the meantime, the ID Method is the only way to mix custom and normal post types.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
Forum Timezone: UTC 1

Most Users Ever Online: 28

Currently Online: esana, nloronacele
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

johnbroome: 13

speedyp: 12

sjpeaches: 12

CherylMcL: 10

gscorp: 8

lsnoei: 8

Member Stats:

Guest Posters: 770

Members: 1300

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 7

Topics: 980

Posts: 4299

Newest Members: jochris26, eva-aa, Tushar, chargers3, jwhetstone, robert

Moderators:

Administrators: Ade (2493)