• Resolved devonanne

    (@devonanne)


    I’ve just set up ShiftNav on my WordPress site and like how it works. However, it seems to strip the standard body classes out of the <body> tag on WordPress pages/posts. These are vital for my page-specific CSS – ie body.page-id-2 {CSS goes here}. When ShiftNav is enabled, the body classes are overridden with body class=”customize-support shiftnav-enabled shiftnav-lock”. No way to target specific pages. Anyone know a way around this?

    https://wordpress.org/plugins/shiftnav-responsive-mobile-menu/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter devonanne

    (@devonanne)

    I figured out a workaround. I added class=”<?php echo $post->post_name; ?>” to my main wrapper div in my page.php file, so now I can use that to define custom CSS for the page.

    Plugin Author sevenspark

    (@sevenspark)

    Hi devonanne,

    Glad to hear you got it sorted out, but ShiftNav won’t strip out the classes on your body tag (it’ll just add its own in addition to those classes). Sounds like something else on your site is interfering.

    Best,

    Chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ShiftNav removes WordPress body classes’ is closed to new replies.