2 Templates?
-
I solved the problem to have 1 template added to the default one. But now I got to add a second template to plugin and i tried
function myRowTemplates( templates ) { templates.push( { name: '1-1', title: '1 Columns (1:1)', icon: 'editor-justify', templateLock: 'all', template: [ [ 'wp-bootstrap-blocks/column', { sizeXs: 1, sizeMd: 4, }, ], ], } ); templates.push( { name: '1-2', title: '2 Columns (1:2)', icon: 'editor-justify', templateLock: 'all', template: [ [ 'wp-bootstrap-blocks/column', { sizeXs: 12, sizeMd: 10, }, ], [ 'wp-bootstrap-blocks/column', { sizeXs: 12, sizeMd: 2, }, ], ], } ); return templates; } wp.hooks.addFilter( 'wpBootstrapBlocks.row.templates', 'myplugin/wp-bootstrap-blocks/row/templates', myRowTemplates );
but it didn’t work. Am I missing something to query?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘2 Templates?’ is closed to new replies.