Last active
March 3, 2018 20:05
-
-
Save beaverbuilder/b9c0f20d9b65829b2372954e16eadf5f to your computer and use it in GitHub Desktop.
This snippet is used in the following knowledge base article – http://kb.wpbeaverbuilder.com/article/591-create-a-filter-to-customize-the-display-of-post-data
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
<php //Don't show this line | |
function fl_builder_loop_query_args_filter( $query_args ) { | |
if ( 'example-module' == $query_args['settings']->id ) { | |
$query_args['post_type'] = array( 'post', 'product' ); | |
} | |
return $query_args; | |
} | |
add_filter( 'fl_builder_loop_query_args', 'fl_builder_loop_query_args_filter' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment