Support » Fixing WordPress » Integrating lazy gallery link into dynamic highlighting menu problem

  • I have installed Lazy Gallery and it is working fine, however I want to place a link to the gallery in my dynamic menu at the top and have it dynamically highlighted when I select it. Currently, my other pages (which are WP pages) are dynamically highlighted using the ‘is_page’ function. How do I dynamically highlight the lazy gallery page? I’ve been trying to use ‘isset’ but being a PHP novice I can’t get it to work.

    My dynamic menu part of header.php currently looks like this –


    <?php

    if ( is_page('Biographies') ) { $current = 'biographies'; }
    elseif ( is_page('Link List') ) { $current = 'linklist'; }
    else { $current = 'weblog'; }
    ?>



    <div id="navlist">

  • Weblog
  • Biographies
  • Link List
  • </div>

    the Whole Shhbang can be found at http://c0axial.co.uk/shhbang/shhbang-cms

    Some help much appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • tWS

    (@tws)

    Thanks Lorelle but unfortunately that info doesn’t solve my problem. I’ve just looked at your site and you use a gallery similar to what I want but with WP pages. How did you do this? Are you using a plugin similar to lazy gallery?

    The issue is more of a PHP one I guess, but in relation to dynamically highlighting both WP pages and static pages in a horizontal menu. Any ideas?

    jwurster

    (@jwurster)

    You might have to build the link yourself. Have you tried “…yourdomain/lazy-index.php”?

    tWS

    (@tws)

    My problem is related to getting the lazy-index.php into my dynamic menu and more importantly getting it to highlight correctly using some sort of ‘isset’ or similar function together with the ‘is_page’ WP function ??

    jwurster

    (@jwurster)

    How about doing an “if function(‘showGallery’)”.

    tWS

    (@tws)

    Would I need to use an ‘include’ or ‘require’ pointing to the lazy-gallery.php to use that function in my header.php? Not entirely sure.

    jwurster

    (@jwurster)

    Now that I see what is meant by dynamic, you would make a page for your gallery. Then you would use the same logic above. However, I haven’t gotten that to work completely yet. The page works fine, but when I click on a gallery, I am not sent to the gallery but to the first page in my blog. Haven’t figured that out yet. Maybe you will have better luck.

    I have had success creating a link directly to lazy-index. See http://www.jwurster.us/wordpress/lazy-index.php. I have it modified to use some of my sidebar stuff.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Integrating lazy gallery link into dynamic highlighting menu problem’ is closed to new replies.