• I’ve just added Fgallery to a site that uses dynamic menu highlighting and I have no idea how to highlight the “gallery” tab when viewing a gallery. My navigation simply uses the (is_page(‘pagename’)) or (in_category(‘5’)) function to detect what page is being diplayed. The problem is Fgallery is not a page or a category so I have no idea how to detect when a gallery is being displayed. Does anyone have any suggestions?

    Here’s the site with the issue if you want to take a look:
    https://www.bondstreetimports.com/gallery/

Viewing 10 replies - 1 through 10 (of 10 total)
  • i think one way you could do this is Write a Page and call it gallery and and put gallery in the post slug…this actually makes gallery a page…it has worked for my fgallery installation for my purposes…should work for you as well…

    Thread Starter eparks11

    (@eparks11)

    Thanks for the tip, but that didn’t work for me. Do you have an example of it working somewhere I can take look at?

    thaKing’s explanation is a bit.. fuzzy?
    see this topic:
    https://www.ads-software.com/support/topic/90005?replies=6

    yep, you can take a look at my site…i have fgallery installed and the default directory it created was “photos”..i then created a new Page called photos and put photos in the post slug…left everything else blank…so now the photos link under my pages goes to the fgallery default directory of photos..

    here’s my site https://www.jeremyking.com

    an update on the thread moshu linked to:

    i originally installed the plugin but wasn’t all that happy with it…uninstalled it, changed my permalinks to the “date and named based” permalinks – /%year%/%monthnum%/%day%/%postname%/ -…then i did what i mentioned above…created a Page called photos with the post slug of photos…i don’t use the plugin he mentioned…

    So, how do you redirect the empty Page to your gallery?
    (just curious)

    i wish i could tell you…i honestly haven’t done anything outside of what i’ve posted above…i forget why i decided not to use the plugin, but i got rid of it and changed my permalink structure..that’s it…

    i even went as far as changing the fgallery directory to something like Pics instead of Photos…created a new Page called Pics and when i clicked on the Pics link that was added in my PAGES section it took me to my gallery…deleted the Pics Page, created another Photos page, changed fgallery back to photos and it still worked…

    i thought maybe i was missing something (mentally missing something, not physically) about why this was working, maybe this was how WordPress was supposed to work…i dunno…it just worked that way…

    Thread Starter eparks11

    (@eparks11)

    Sorry, for the delay, I’ve been upgrading to Vista the last few days, woohoo :S

    Thanks for all the help, but none of the suggestions have seemed to help much. Here is an example of the Navigation list used in the header file of the site:

    <li <?php if (is_home()) { echo “class=\”current\””; }?> >

    <li <?php if (in_category(‘5’)) { echo “class=\”current\””; }?> >

    <li <?php if (is_page(‘gallery’)) { echo “class=\”current\””; }?> >

    The dynamic menu highlighting still highlights the “Message Board” tab (yes, I know it’s not a message board, but the client wanted the blog to be called that for some reason, don’t get me started) no matter what I try. I’ve tried using the redirectify plug in, I’ve tried creating a page galled “gallery”, I’ve tried virtually every other suggestions also. At this point I am totally out of ideas, I simply have no idea how to use dynamic menu highlighting to highlight the /gallery/ slug Fgallery creates.

    I’m having a similar problem, I think. I’m using the WPG2 gallery plugin and have dynamic menu highlighting on my site. I created a page called “gallery” and used the redirectify plugin to show the gallery content when a user clicks on that page. But the redirection means the gallery link is not highlighted as current in my page menu. Any suggestions welcomed for a way around this.

    For anyone else, I found a slightly clumsy solution to this. I excluded my gallery page from wp-list-pages and inserted it manually at the end of the list. Since WPG2 uses a different header to the other pages, I was able to make its menu state “current” when the gallery page is shown.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Dynamic Menu Highlighting and Fgallery’ is closed to new replies.