Jump to content

php and lightbox coding.. help! :)


WinteRx182

Recommended Posts

so, I'm doing this website, and for the most part I've been able to handle the php with what little I know.

 

http://njypprojects.com/jeffswp/

 

The desired effect is inside the menus area, I would like the links, such as the snacks and salads link, to pop open a lightbox (such as you see happen on the gallery page) of an image of their menu section.. for whatever reason, this is boggling my brain on how to go about it, if its possible at all with what I'm working with and trying to do.

 

I've found where I believe the area I would go about doing this is.. (inside the loop-menu.php)

<div class="tile-block">
                                
                                    <?php if ($term_image['src']) { ?>
                                
                                        <div class="term-image overlay">
                                
                                                <a data-gallery="gallery" href="<?php echo $term_image['src']; ?>" " title="<?php echo __($term->name); ?>"> 
                                                <img src="<?php echo $term_image['src']; ?>" alt="<?php echo __($term->name); ?>" />
                                                <span class="overlay-block"><span class="overlay-icon"></span></span>
                                                
                                            </a>
                                        
                                        </div>
                                        
                                        <h2 class="term-header align-center">
                                            <a href="<?php echo get_term_link($term->slug, $taxonomy); ?>" title="<?php echo __($term->name); ?>">
                                                <?php echo __($term->name); ?>
                                            </a>
                                        </h2>
                                    
                                    <?php } else { ?>

                                        <h2 class="term-header term-header-blank align-center">
                                            <a href="<?php echo get_term_link($term->slug, $taxonomy); ?>" title="<?php echo __($term->name); ?>">
                                                <?php echo __($term->name); ?>
                                            </a>
                                        </h2>
                                    
                                    <?php } ?>

<a data-gallery="gallery" href="<?php echo $term_image['src']; ?>" " title="<?php echo __($term->name); ?>">

 

that is the line I believe to be where the changing would go down, namely the href linking to the menu item.. right now it is just bringing up the exact image that is on the click, and it doesn't come lightboxed on click either.

 

mainly my first question is... is there a way for me to put code there that will apply to all the different menus, for the different pictures? sounds confusing saying it but I'm sure you get what I'm going for ..

 

[lightbox] is the shortcode on the wptheme, so i know the ability is in there, I just don't know how to transform that into the php at all.. in addition to the proper coding for it.

 

just taking a chance here to see if anyone can help, thanks for your time guys and if you need anymore information like the css or more php/html files, just give me a shout and ill be right on it!

 

heres to hoping!

 

:pirate:

Edited by WinteRx182
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.