-
jennyplottParticipant
I have my blog gallery posts going to a page that is set to have the posts view as a grid. I would like to remove the ability to click on the preview images of each post. Is that possible?
AlexanderParticipantHi jennyplott,
Not sure I understand what you’re talking about. Do you have a living example?
Cheers,
Alexander @ http://www.mouseclick.comjennyplottParticipantYes, please go to
http://imaginethatkitchensandbaths.com/design-gallery/and if you click on the image thumbnails for each post it brings you to a separate page with just the image and NOT the actual post like it should. Make sense?
AlexanderParticipantHi jennyplott,
in the file functions.php find the function pinboard_post_gallery() and remove the complete (a href=”…”) tag line and the the closing tag (/a) line.
Unfortunatly this forum is not allowing to post code 1:1.
Cheers,
Alexander @ http://www.mouseclick.com- This reply was modified 11 years, 11 months ago by Alexander.
AlexanderParticipantReplace this:
<a href="ID, 'full' ); echo $image[0]; ?>" class="colorbox" title="ID ) ); ?>" rel="attachment">
ID, "gallery-{$count}-thumb" ); ?>with this:
ID, "gallery-{$count}-thumb" ); ?>
jennyplottParticipantSo I made your suggested change and now the image thumbnails are gone. Can I just have the image thumbnails still there but without an link the image location. The images should link to the actual post page?
AlexanderParticipantHi jennyplott,
You deleted too much. Try only to delete the (a) and (/a) tag but leave the (img) tag.
Cheers,
Alexander @ http://www.mouseclick.comjennyplottParticipantok, this is what I removed….
<a href="ID, ‘full’ ); echo $image[0]; ?>” class=”colorbox” title=”ID ) ); ?>” rel=”attachment”>
ID, “gallery-{$count}-thumb” ); ?>…..That is everything in between the and tag. But you’re telling me I removed too much? What exactly should it look like?
YPSParticipantHi Alexander — first, I just want to say that your posts have been extremely helpful in figuring out how to set up this theme.
I was able to successfully remove the link (to the image file) from the gallery post and image post types by following your suggestions here, so now the thumbnails have no link, which is a decent option — but instead I would rather have the thumbnail images link to the actual post so that viewers can click on the post title or the thumbnail and it will take them to the same place.
Can you provide the php code for this? I copied the coding I deleted from the functions.php file, so I can add that back and modify the “a href” tag so it links to the post instead of the image, I just need to know what the link code to individual posts should look like because I am not familiar with php. Thanks!
YPSParticipantJennyplott — you need to remove the line (including the < symbol) that starts with "a href" and also the small end tag "/a" (including the symbols that surround it) but leave the middle line of code that begins with ?php echo… it’s hard to explain without being able to post actual copy of the code.
What you are doing is leaving the code that tells it to retrieve the image so that it will still produce a thumbnail, but removing the part of the code that turns the image into a link (the “a href” line and “/a” ending tag).
YPSParticipantYay — I figured it out by coping the permalink code to the post under the pinboard_post_thumbnail section of the functions.php file.
jennyplottParticipantTHank you for your help. I have successfully removes the link from the images.
jennyplottParticipantYPS – what exactly did you put in the “permalink code to the post under the pinboard_post_thumbnail section of the functions.php file.”
I need the images to go the the post as well. I’m a code dummy, so if you can tell me exactly what should go there that would be great!
You must be logged in to reply to this topic.