I am trying to alter the position that the filter appears for posts grids and also alter the markup of the filter but am so far unable to do so.
Simple Set Up
This is how I have created my post grid and filter.
- Create page
- Add Visual Compser element 'Post Grid'
- In Post Grid settings check 'Show Filter'
Position of Filter
It seems that the filter gets added to
plugins/js_composer/include/classes/shortcodes/vc-basic-grid.php in private function
renderItems (around line 255).
How can I override this class and function to change where the filter is added (for instance moving the filter to after the grid items)?
It looks like the markup for the filter should be in
plugins/js_composer/include/templates/shortcodes/vc_basic_grid_filter.php. Indeed, if I edit this file the markup of the filter changes (I know this is not good practice - read on). However, unlike other files in this directory, if I copy this file to
mytheme/vc_templates/ it does not get overridden.
So how can I override this file in order to change the markup?