Slicknav appearing in duplicate on blog

310 Views Asked by At

On my blog page of this in-progress site — http://gratzergraphics.com/clients/ggllc/blog/ — the Slicknav menu appears twice. I cannot figure out why or how to get rid of the duplicate. It's only like this on the blog.

1

There are 1 best solutions below

1
On

On your blog page you are initializing slick using the $('nav'), which is right. However, I see on your blog page that on line 184 you also have another <nav> tag:

<nav class="navigation pagination" role="navigation">
 <h2 class="screen-reader-text">Posts navigation</h2>
 <div class="nav-links"><span class='page-numbers current'><span class="meta-nav screen-reader-text">Page </span>1</span>
    <a class='page-numbers' href='http://gratzergraphics.com/clients/ggllc/blog/page/2/'><span class="meta-nav screen-reader-text">Page </span>2</a>
    <span class="page-numbers dots">&hellip;</span>
    <a class='page-numbers' href='http://gratzergraphics.com/clients/ggllc/blog/page/7/'><span class="meta-nav screen-reader-text">Page </span>7</a>
    <a class="next page-numbers" href="http://gratzergraphics.com/clients/ggllc/blog/page/2/">Next page</a></div>
</nav>

So it looks like since you have 2 <nav> tags in there and you are using $('nav') as your selector, you're seeing 2 instances of the plugin. You can either get rid of that or just target the slick nav with a class or an ID. Hope this helps you out.