Skip Navigation

[Resolved] Widget title has no markup

This support ticket is created 8 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.01 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by Dido 8 years ago.

Assisted by: Nigel.

Author
Posts
#442059

Hello,

can you please help me with an unfinished item in Layouts according to displaying widgets?

in the file wpddl.cell_widget_area.class.php on line 90 you see this code
// Don't show the create new widget area button in this version
// We'll complete this later

this was not fixed in the version of the 27th.
when will this be fixed and what do you suggest in the meantime?

#442543

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I can't see any debug info for your site to know which version of Layouts you are using, but in the current Layouts version 1.8.5 there is no such comment in the wpddl.cell_widget_area.class.php file.

I quickly tested adding a widget cell to a layout and it worked as expected, including rendering on the front end.

Please be sure to have updated to the latest version.

#442637
widgets.jpg

Hi, you are right, the sentence is removed, but it is still not working. (I updated to the latest version of all Toolset components)

adding 1 widget is no problem, but when I want to add a sidebar, the frontend has no markup.

hidden link

#442684

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Any markup that is added to Widget titles in a sidebar depends upon your theme.

Here, for example, is the code which twentysixteen uses to register 3 widget areas, for each of which 'before_title' and 'after_title' are used to set the markup which wraps the widget titles.

<function twentysixteen_widgets_init() {
	register_sidebar( array(
		'name'          => __( 'Sidebar', 'twentysixteen' ),
		'id'            => 'sidebar-1',
		'description'   => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ),
		'before_widget' => '<section id="%1$s" class="widget %2$s">',
		'after_widget'  => '</section>',
		'before_title'  => '<h2 class="widget-title">',
		'after_title'   => '</h2>',
	) );

	register_sidebar( array(
		'name'          => __( 'Content Bottom 1', 'twentysixteen' ),
		'id'            => 'sidebar-2',
		'description'   => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
		'before_widget' => '<section id="%1$s" class="widget %2$s">',
		'after_widget'  => '</section>',
		'before_title'  => '<h2 class="widget-title">',
		'after_title'   => '</h2>',
	) );

	register_sidebar( array(
		'name'          => __( 'Content Bottom 2', 'twentysixteen' ),
		'id'            => 'sidebar-3',
		'description'   => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
		'before_widget' => '<section id="%1$s" class="widget %2$s">',
		'after_widget'  => '</section>',
		'before_title'  => '<h2 class="widget-title">',
		'after_title'   => '</h2>',
	) );
}
add_action( 'widgets_init', 'twentysixteen_widgets_init' );

I'm not sure what theme you are using. The Toolset starter theme doesn't register any markup to wrap widget titles, and if you dynamically create new widget areas in layouts they will not either.

You can register a widget area in your theme's functions.php file much like the sample from twentysixteen and then use that widget area with your widget area cell, and the markup for the title will be applied.

#442693

Hi Nigel,
ah, that makes sense. It works, see hidden link
thank you very much <3

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.