Add User ID in body class WordPress

3 March 2018 в 19:14 Web developer blog

WordPress has this nifty little “body_class()” function that I use every now and then to add css classes to the html “body” tag.

Today I wanted to add the current user’s id to the class, and here’s how I did it:

or you can use second method class=”administrator user-id-1″


Смотрите так же:

Get a Free Quote
Please fill this for and we'll get back to you as soon as possible!

Name *

Email *

Message *

Корзина пуста