In this tutorial, i’ll provide all the PHP & CSS code you can use to add your Twitter Follow Count Button In any StudioPress theme Navigation Menu.
The code works in either the primary or secondary nav menu and floats the button to the right by default.
It creates a widget area which you can use with a default WordPress text widget.
Or use this code & change the Twitter handle:
Lifestyle Theme Secondary Nav Menu
Here’s what the button looks like in the secondary nav menu of the Lifestyle child theme by StudioPress.
Here’s the code:
Metro Theme Primary Nav Menu
The CSS is slightly different for each theme and in this case the button is displayed in the primary nav menu.
Here’s the PHP & CSS code.
Sample Theme Primary Nav Menu
Simply change the menu location in the PHP code from secondary to primary and vice versa.
Sample Theme Secondary Nav Menu
This code can be used in any StudioPress child theme and only requires changing of the margin: value; in the CSS code.
Add More To The Genesis Nav Menu
- Add Twitter Button In WordPress Nav Menu
- Add Search Form To Any Genesis Nav Menu
- Adding Social Media Buttons To The Genesis Navigation Menu