Post Loop Widget – Post Type not showing up in loop – $args required?
-
Hello!
We’re presently attempting to create a loop of file downloads from another plugin (Download Manager) that generates its own custom post type (dlm_download). We have a bit of a mix between custom Bootstrap-based .PHP template files and Page Builder to allow for some freedom of layout, but also heavy customization.
While we’d usually run a PHP-based query in one of the templates, the particular layout of this page requires doing so via Page Builder; hence the use of the Post Loop widget. Unfortunately the CPT created by the download plugin is not showing up in the Post Type options.
We’re all set up to add an action to change the $args on this post type in order to force it to show up (as below):
add_action('register_post_type_args', function ($args, $postType) {
if ($postType !== 'dlm_download'){
return $args;
}
$args['ExampleArgument'] = ArgumentSetting;
return $args;
}, 99, 2);…but instead of cycling through every possible option, we thought it would be easier to ask what arguments are necessary to get this CPT to pop up in the Post Loop > Post Type options.
P.S.: We tried public => true, but encountered a server loop (possibly because we’re trying to run it as an mu-plugin; haven’t checked yet).
Thank you!
- You must be logged in to reply to this topic.