Featured Content Gallery | WordPress Plugin | iePlexus

Custom Post Types

New releases, ideas for the future, and known issues

Custom Post Types

PostBy burke on Thu Jun 24, 2010 7:10 am

I have created a custom post_type called "video" which shares a category called "Featured" with the post_type, "post." In my FCG, I am only able to show Featured posts that are the post_type "post" and not those that are post_type "video."

I tried going into content-gallery.php and everywhere I found

$query_suffix = "post_type = 'post'

changing it to

$query_suffix = "(post_type = 'post' OR post_type = 'video')

this did not work. What am I missing? Does anyone have any advice? Thanks in advance?
burke
 
Posts: 3
Joined: Thu Jun 24, 2010 7:05 am

Re: Custom Post Types

Thank you for using the Featured Content Gallery Forum
 

Re: Custom Post Types (solved)

PostBy burke on Thu Jun 24, 2010 10:44 am

Got it!

at line 56 of gallery.php where you find:

<?php $temp_query = $wp_query; ?>
<?php query_posts('cat......
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

change it to:

<?php $temp_query = $wp_query; ?>
<?php query_posts(array(
'cat' => get_option('gallery-category'),
'post_type' => array('post', 'video'),
'showposts' => get_option('gallery-items'),
)); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
burke
 
Posts: 3
Joined: Thu Jun 24, 2010 7:05 am


Return to Development, Improvement, and Conflicts

Who is online

Users browsing this forum: No registered users and 0 guests