Limited Time Sale - 10% Discount! Use Code:U5ZBQTEY

Post Types


This document explains how to add post types to the Owl Carousel Pro plugin, making them available to display in the carousel.

By default, the Owl Carousel Pro plugin makes it easy to select post types you would like to display right from within the module settings. Simply go to the Content tab -> Query Arguments -> Custom Post Type Name option. Clicking on the input field for this option will display a popup window, allowing you to choose the post type(s) you would like to display.

In most cases the post type you want to display should be available to choose from the popup window – posts, projects, products, events, testimonials, etc. There may be a rare case when the post type you’re looking for is not available. For example, pages and non-public post types are hidden by default. To add these, you can use the following filter added to your child theme’s functions.php file:

function dpocp_default_post_types($default_post_type) {
  return array_merge($default_post_type, array('page' => get_post_type_object('page')));
}

add_filter('dpocp_default_post_types', 'dpocp_default_post_types');

The filter above will add pages to the post type popup window, allowing you to display a carousel of pages in your layout. Simply replace “page” in the function above with the name of your custom post type to make that post type available.

Pin It on Pinterest

Share This