Hi there,
A while back GP support helped with making the category appear in the mobile menu for my website with this code:
add_filter( 'option_generate_secondary_nav_settings', function( $settings ) {
$category = get_the_category();
if ( $category ) {
$settings['secondary_nav_mobile_label'] = 'Explore ' . $category[0]->cat_name;
}
return $settings;
} );
This made something appear such as this:
I have a different type of post format (glossary) which has ‘glossary-categories’ which I want to appear in the menu too. For example, this post should show up as ‘Explore Harry Potter’ where ‘Harry Potter’ is the glossary-category, but it currently shows as an array:
What would I need to do so this appears as ‘Explore Harry Potter’ instead of ‘Explore Array’?
Kind regards,
Will