This code enables you to add your site title within your nav menu like this :
In this screenshot, the site title displays within the primary nav menu as the first item in the menu which you can easily target using the .site-title-menu
class.
The title is only added to the menu if the custom logo has been added & the site title exists otherwise it displays in replace of your custom logo in the default theme position which in this case is the site header of the Genesis Sample child theme.
Customize
When the site title is added or removed from the customize > Site Title field, the customizer preview will update accordingly as seen in the following demo video.
Demo Video
Shows the site title added to the primary nav menu via the customizer when a logo exists.
Tested using the Genesis Sample child theme by StudioPress however will work in any WordPress theme.
Installation Steps
There’s only 1 – 2 steps :
Was This Tutorial Helpful?