Site logo

Archived topic

dropdown-menu-toggle Not Displaying

3 replies · Started by Mike on April 23, 2022

Viewing posts 1–4 of 4

Hi,

Come across a bit of a strange issue... the drop down toggle arrow wont display under my child theme.

I have very little CSS currently and none of it should be overriding the dropdown icon...

Whats interesting is after having compared with a working live site I can see that the :before element is not being generated at all.

Very odd! Any ideas?

Thanks!
Mike

Hi there,

first off - in Customizer > General what is the Icon Type option set to ?

secondly - do you have any functions in the Child Theme functions.php ?

Well there I was typing a nice long response here when I clicked submit and oh bugger my session had expired!

Basically, I sorted it. Its related to my other post - https://generatepress.com/forums/topic/gp-child-theme-set-customizer-options-in-theme/

In my child theme I have a load of customizer options set via the functions.php with some using the generate_option_defaults filter.

It turns out when using the generate_option_defaults filter, any option I don't specify is effectively blanked in the customizer, including the icon type.

So the solution is actually pretty simple, set the icon type via the generate_option_defaults filter.

Like so:

if ( !function_exists( 'gvhgroups_new_defaults' ) ) :
add_filter( 'generate_option_defaults','gvhgroups_new_defaults' );
function gvhgroups_new_defaults()
{
	$new_defaults = array(
             'icons' => 'svg'
	);

	return $new_defaults;
}
endif;

(Obviously my function had a load more array items in it!)

Thanks as ever for the help David!

Glad to hear you got it resolved.

This archived topic is closed to new replies.