• Hi,

    I have just installed and customised image store for a client, and it is working great. At the moment, on one page, I have hacked the code so that it shows the slideshow for each gallery (in store.php all the links to galleries have “/slideshow” appended to the end of the url), and I have made some changes to it without any problem.

    I have created another page where I want to display galleries in the normal manner (without slideshow and with lightbox).

    I want to use this page for when mobile users access the site, so that they are taken into this alternative page, they see each gallery through lightbox. I have been able to setup the page and add in the image store module.

    My problem here is that when I try to hack the store.php page to recognise a variable in the wordpress page (in the wordpress page I have a variable that says $slideshow=off), the page store.php won’t recognise the value of the variable $slideshow. In store.php I am using the following code:

    if($slideshow!='off'){
    		$output .= '<a data-id="' . $enc . '" href="'. $link . 'slideshow" class="url fn item-url" title="' . esc_attr( $data['title'] ) . '" rel="bookmark">';
    		}else{
    		$output .= '<a data-id="' . $enc . '" href="'. $link . '" class="url fn item-url" title="' . esc_attr( $data['title'] ) . '" rel="bookmark">';

    }
    Because I am trying to get the PHP code in store.php to pull in the variable $slideshow which is posted on the wordpress page, I have tried to use the “insert php” plugin, but still the store.php page is not accessing the variable.

    Is there any way that I can pass a variable either on the wordpress page, or in the code in store.php, which will recognise that that page has this variable? I tried to set it as global but this didn’t work either.

    Simply put, I want the mobile url to show all pages without adding slideshow to the url, as above. Maybe there might be an easier way to do it with javascript?

    Thank you in advance,
    Pat

    https://wordpress.org/plugins/image-store/

The topic ‘Image Store (store.php) and working with variables’ is closed to new replies.