Gamepress Custom post type problem. (4 posts)

  1. Arterus
    Posted 3 years ago #

    Hi all,

    First I would like to say that I would highly recommend the free, Gamepress theme, it's very well put together and very user friendly! However I'm having an issue with it...

    I am using a custom post type, and for the slider I am using a specific category to pull images from.

    This only works with 'Posts' and not my own custom post type.

    Example.. The category I am using is 'New release' and if I make a new 'Post' and check 'New Release' and give it a featured image it works. The featured image is shown in the slider.

    However, if I use my own custom post type, and tick 'New Release' make sure its got a featured image... No image shows..

    Could anyone shed any light on why that may be please?



  2. alex27
    Posted 3 years ago #

    Home page slider will not work with your custom post type, only with post types built in GamePress (Reviews and Videos). To achieve this you'd have to modify one of the files (depending on wchich option of Nivo slider you're using) located in includes folder. Use the code you'll find there as example, and you should be able to exapnd it to include your custom post type.

  3. Arterus
    Posted 3 years ago #

    Thanks Alex, your work and effort on the Theme are greatly appreciated. I will try that out tomorrow and let you know how I get on.


  4. Arterus
    Posted 3 years ago #

    Hmm, just had a quick look at this and it seems its beyond my realm of knowledge.

    	$tmp = $wp_query;
            $variant = of_get_option('gamepress_slider_variant');
            $limit = (int)of_get_option('gamepress_slider_limit');
               if( $limit ) :
                   $limit = of_get_option('gamepress_slider_limit');
                   $limit = 4;
                    if( $variant == '1') :
                        $cat = of_get_option('gamepress_slider_category');
                        $wp_query = new WP_Query( array( 'cat' => $cat, 'posts_per_page' => $limit ) );
                    else :
                        $wp_query = new WP_Query( array( 'posts_per_page' => $limit, 'post_type' => array( 'post', 'gamepress_reviews', 'gamepress_video') ) );
    				if(have_posts()) :
    					while(have_posts()) :

    I guess it's in there somewhere, but I have no idea how to add mine too it :(

    Thanks anyway,


Topic Closed

This topic has been closed to new replies.

About this Topic