Last active
January 18, 2024 16:19
-
-
Save crawford252/ce1817ce2ae898c96ec743b536058734 to your computer and use it in GitHub Desktop.
Divi FilterGrid - Alter Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'dpdfg_ext_set_query_arguments', 'dpdfg_ext_set_query_arguments', 10, 2 ); | |
function dpdfg_ext_set_query_arguments( $query_args, $props ) { | |
if ( isset( $props['module_class'] ) && $props['module_class'] === 'related-recipes' ) { | |
$query_args['post_type'] = 'recipe'; | |
} | |
return $query_args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment