How can I add this code to my theme ?

Hi Guys.

I’m looking for a little help, I’m not a theme developer, Im looking to learn how to do thing do things myself and learn a little instead always turning to someone for every little thing.

I want to add this to wordpress and later add a online/offline icon and message count option to it but i’ve never do anything beyond the basic of css change or just copy and space code in the stated section.

So I could really do with a little help.

I’m assuming I need to add the html in the correct header php but do i add the css to the style.css or some other file ?
also where do i add the JS Code ?

You can do this by creating a child theme (you’ll put the HTML code in the header.php in the child theme, the JS code in the child theme main JS file and the CSS code in the child theme’s main CSS file)

Here is how to create a child theme:

If you need a faster&automatic way, you can automatically generate a child theme with the help of “child theme generators” plugins (there are a couple of them when you google it).

1 Like