- This topic has 3 replies, 2 voices, and was last updated 8 years, 1 month ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP Photo Seller › How to move the View Gallery Button to top of Details Page ?
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
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>';
?>`
`
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.
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
}