Use pages instead of posts in a grid/gallery

Heya,
I’m working on a custom module that is basically a replica of the built-in Posts module - I’d like to pull in Pages instead of Posts. My logic is flawed somewhere and I’m hoping you can point me in the right direction.

I duplicated loop-settings.php and placed that within the module folder of the plugin (so structure is /plugin-name/module-name/loop-settings.php). The only change I made to the file was changing the post_type from post to page in the FLBuilderModel default settings.

My last step was to point my module to this new file instead of the loop-settings.php file within the BB plugin. (So from module-name.php I changed the default content file from
'file' => FL_BUILDER_DIR . 'includes/loop-settings.php',
to
'file' => 'loop-settings.php',

The module is still pulling back posts instead of pages.

Where am I going wrong?

Thank you,
Carrie

Hey Carrie,

Our Posts module should support Pages by default. It should be an option under Content > Post Type. Is this not the case for you?

Ben

#facepalm

It does - I just like making things infinitely harder than needed.

Runs off to get more coffee

I thought I missed something there. :slight_smile: Also, regarding your initial inquiry, you may have needed to clear the BB cache before the changes took effect.

Enjoy! :slight_smile:

Ben