Site logo

Archived topic

Please add support to customise register_sidebar element type

3 replies · Started by Mark on September 12, 2019

Viewing posts 1–4 of 4

Hi,

I love the theme, I am using it on all my sites going forward where I can. its light but also customisable and gives me a break from underscores.

for SEO purposes it would be fantastic to add an option to customise the widget element type from h2 to either h3/h4/p/span etc?

I have hardcoded it for current use but will forget when I update in the future.. :)

/inc/general.php

		foreach ( $widgets as $id => $name ) {
			register_sidebar( array(
				'name'          => $name,
				'id'            => $id,
				'before_widget' => '<aside id="%1$s" class="widget inner-padding %2$s">',
				'after_widget'  => '</aside>',
				'before_title'  => apply_filters( 'generate_start_widget_title', '<h2 class="widget-title">' ),
				'after_title'   => apply_filters( 'generate_end_widget_title', '</h2>' ),
			) );
		}

Perfect, of course I should have known! thanks alot.

Almost everything in GP has a filter - its Tom's obsession :)
Glad to be of help.

This archived topic is closed to new replies.