Just curious if this is possible…
On config where you declare the templates that should not display a sidebar, is there a way to use a wilecard here?
I have a few templates that carry the same root name “work-…” and it would be awesome to use something like "work-*.php here if possible.
In this case it’s not a big deal. I have 3 templates to write in but if this came up in the future I’d like to put this to good use.
function roots_display_sidebar() {
$sidebar_config = new Roots_Sidebar(
/**
* Conditional tag checks (http://codex.wordpress.org/Conditional_Tags)
* Any of these conditional tags that return true won't show the sidebar
*
* To use a function that accepts arguments, use the following format:
*
* array('function_name', array('arg1', 'arg2'))
*
* The second element must be an array even if there's only 1 argument.
*/
array(
'is_404',
'is_front_page'
),
/**
* Page template checks (via is_page_template())
* Any of these page templates that return true won't show the sidebar
*/
array(
'work.php',
'work-*.php',
)
);
return apply_filters('roots_display_sidebar', $sidebar_config->display);
}
Thanks!