the answer for all question about Oxygen Builder plugin and WordPress

[SOLVED] Hi all, I have a custom menu build with ul en li. (so not using the wor

[SOLVED] Hi all, I have a custom menu build with ul en li. (so not using the wordpress menu) Is it possible somehow to hightlight the current page?
I use this snippet:
function add_slug_body_class( $classes ) {
global $post;
if (isset($post)) {
$classes[] = $post->post_type . ‘-‘ . $post->post_name;
}
return $classes;
}
add_filter(‘body_class’, ‘add_slug_body_class’);
So the slug becomes a body class and then add css:
#home .home, #about .about, #about .about, #contact .contact
{
Your CSS stylings here
}



Source

Boundaries

Checkout Woo Design Set

Leave A Reply

Your email address will not be published.

Oxyrealm Docs OxyMade - Oxygen Builder Design Set Mega collection