We set about building the bar below the gallery header. This bar has quite a job. It tells people where they are and what they are viewing (breadcrumbs, in a simple way). It also will contain pagination, a button, and all the while needs to be responsive.

This is start of what we refer to as "black bar" navigation which really becomes a thing for the rest of the sites design.

We write the markup for the bar, including using our icon font when needed for the down arrow in the dropdown menu. It's easy to quickly reference the character chart in Font Explorer X to get what value the HTML icon can be.

We use the wp_tag_cloud() function to spit out onto the page a list of tags from our custom taxonomy for the gallery. We simply style up the markup to behave like a dropdown menu. We write just a touch of JavaScript to show/hide this dropdown menu. Like we've done in the past with the site's main navigation, all we do is change a class name with the JavaScript and let the CSS do the work.

By the end we have a working dropdown menu for the Gallery, which is nice. It's really the workhorse of Gallery navigation.


  1. Josh Eaton
    Permalink to comment#

    I was going to ask how you eventually go about changing your compiled JavaScript files back to a normal name without the -ck.js prefix.

    Then I saw you keep it like that on the live site.

    Then I realized that I’m probably way too OCD about things like that. :)

Leave a Comment

Posting Code

We highly encourage you to post problematic HTML/CSS/JavaScript over on CodePen and include the link in your post. It's much easier to see, understand, and help with when you do that.

Markdown is supported, so you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences like this:

  function example() {
    element.innerHTML = "<div>code</div>";

We have a pretty good* newsletter.