Posted by & filed under Web.

I didn’t think putting a Navigation Bar would be so hard. I have spent the better part of the last day and a half wrestling with WordPress and Gallery2 embedded to put in a tabbed navigation bar so I have a link to my Gallery. Most of the problems arise from the fact that the Gallery2 is embedded into the WordPress but WordPress doesn’t see it like that and makes the highlight on the gallery tab disappear when browsing albums.

I got very frustrated with trying to get wordpress to do the right thing for me so in the end I decided to hack it and do the highlighting myself. This method would probably not be suitable for a lot of people but it got me going, I am checking whether the URI is has “/v/” which is how URL rewrites work in Gallery2, before deciding that we are actually in the gallery embedded pages, this is very site specific so be aware.

I put the following code into my header.php and wpg2header.php

I added the following to my style.css and wpg2.css


Also thanks to Pud for helping me.

Comments are closed.