Custom Query
This document explains how to use the Custom Query option available in the Design tab of all three modules added to the Divi Page Builder by the Portfolio Posts Pro plugin.
Turning the Custom Query option on will bypass the query created by the Post Type checkboxes, Category checkboxes, and the Include and Exclude tag filters. Once the option is enabled, the module will look in the child theme’s functions.php file for the following filters:
dp_ppp_custom_query_args
Below is a basic example of how to use the filter:
The query created by the filter above will be used on every instance of the module that has the Custom Query option turned on. To use different queries for different modules, you can target the module’s CSS ID or class:
In the example above we are passing the module’s settings to the custom content filter using the $props argument. We can then target modules individually by their ID or Class value set in the Advanced tab -> CSS ID & Classes section. We are targeting the module’s CSS ID in the example above. In the example below we are targeting the module’s CSS Class.