Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #58162
    Juan
    Participant

    Hello Sakin,

    I hope you are well and things recovering in Nepal. My thoughts are with you all.

    Just a quick question. Would it be possible to add the facility to use a custom post on the slider?

    I’m using an event manager and it creates custom events posts but the slider can’t pick them up (unless I’m doing something wrong).

    It would be great if you could help.

    Thank you. Catch Box is a great theme!

    #58205
    Sakin
    Keymaster

    @Juan: We are doing fine and we are slowing recovering.

    Yes, it will not take custom post type. For that you need to build child theme, refer to child theme at http://catchthemes.com/blog/create-child-theme-wordpress/

    1. Then copy catchbox_sliders() function to your child theme functions.php file and then edit the following code:

    $get_featured_posts = new WP_Query( array(
    	'posts_per_page' => $postperpage,
    	'post__in'		 => $options[ 'featured_slider' ],
    	'orderby' 		 => 'post__in',
    	'ignore_sticky_posts' => 1 // ignore sticky posts
    ));

    In the above code you need to add in post_type. So, it will be as below:

    $get_featured_posts = new WP_Query( array(
    	'posts_per_page'		=> $postperpage,
    	'post_type'				=> 'post,events',
    	'post__in'				=> $options[ 'featured_slider' ],
    	'orderby'				=> 'post__in',
    	'ignore_sticky_posts'	=> 1 // ignore sticky posts
    ));

    Note: you need to change that events with your post type.

    #58236
    Juan
    Participant

    @Sakin,

    Thank you so much for the speedy response.

    It worked beautifully!

    Very grateful to you.

    #58237
    Sakin
    Keymaster

    @Juan: Thanks 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Custom Post Slider’ is closed to new replies.