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

Post Types


This document explains how to add post types to the Portfolio Posts Pro plugin, making them available to display in the layout.

By default, the Portfolio Posts 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 dpppp_default_post_types($default_post_type) {
  return array_merge($default_post_type, array('page' => get_post_type_object('page')));
}

add_filter('dpppp_default_post_types', 'dpppp_default_post_types');

The filter above will add pages to the post type popup window, allowing you to display 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