Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

How to move the View Gallery Button to top of Details Page ?

by

Tips and Tricks HQ Support Portal › Forums › WP Photo Seller › How to move the View Gallery Button to top of Details Page ?

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 7 months ago by Peter.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • October 14, 2016 at 10:32 am #13773
    WebInc
    Member

    We wish to have the ‘View Gallery’ button on the details page at the top above the image. (as well as on the bottom).

    We could create a hook box or something to put it in (if that’s the best way) but what is the code we should use to do that?

    Or is there a known way to make it appear there. I couldn’t find anything in the forum, so forgive me if this has already been answered.

    Thank you

    October 15, 2016 at 11:21 am #74394
    WebInc
    Member

    I know we probably shouldn’t, but we added code to your photo-details-template.php and photo-details-template-new.php pages like this, to add a ‘Back to Gallery’ link at the top of the Photo Details page.

    I know it is liable to be overwritten when the plugin is updated, so would be grateful if possible, for you to include the option of a ‘Back to Gallery’ link at the top of Photo Details with future updates.

    Thank you

    `

    <?php

    echo '<a href="'.$gallery_page.'gallery'.$cached_current_gallery_id.'">«Back to Gallery</a>';

    ?>`

    `

    October 17, 2016 at 11:29 am #74395
    Peter
    Member

    I think the best way to do this would be to add a wordpress filter in the code which renders the photo details page. You would then use that filter by putting code in your theme’s functions.php file and hence you will never need to modify the photo seller core code.

    I will look into this and let you know later in the week.

    October 21, 2016 at 2:01 am #74396
    Peter
    Member

    After thinking about this, a better way to solve your issue without hacking the plugin is to add some code to your theme’s functions.php file which will use javascript to add a button after page is loaded.

    Here’s an example:

    add_action( 'wp_footer', 'footer_tasks' );

    function footer_tasks()
    {
    ?>
    <script type="text/javascript">
    jQuery(document).ready(function($){
    var cloned = $('.wps_photo_details_continue_shopping_section').clone().addClass('continue_shopping_section_top');
    $('.wps-image-details').prepend(cloned);
    $('.continue_shopping_section_top').wrap('<div class="continue-shopping-top"></div>');
    });

    </script>
    <?php
    }

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ