[Plugin: YAPB] linking images to previous post
-
I’m trying to add a link to the actual images on my posts so that they link to the previous post. So far I’ve tried the following:
Several variations of this in the loop:
<?php if (yapb_is_photoblog_post()): ?> <!-- This definitly is a YAPB Photoblog post --> <?php else: ?> <!-- No image attached: This is a normal WordPress post --> <?php endif ?> <?php if (yapb_is_photoblog_post()): ?> <?php echo '<a href="' . previous_post('') . '" ' . 'img src="' . yapb_image('', array(), '') . '" ' . 'border="0" ' . 'alt="Previous photo" ' . '/>'; echo '</a>'; ?> <?php else: ?> ... <?php endif ?>
This does call the correct images, but I cannot get the link to become one with the image. I can get it to appear above or below as text, but not in the image.
I’ve also tried displaying the images as thumbnails, which link fine from my ‘archive’ page, following this thread: https://johannes.jarolim.com/yapb-forum/showthread.php?tid=229And finally, I’ve been trying to figure out how to adapt the Yapb.class.php file to include
$imageLink = $image->uri;
as per this thread https://johannes.jarolim.com/yapb-forum/showthread.php?tid=544 but haven’t got far with that as I’m not sure what lines to change (the lines referred to in that thread don’t correspond with what I’m doing as they’re changing the thumbnail function, not the single images).I think I’m making this way more complicated than it needs to be. I’ve tried posting on the plugin forum, but it’s pretty quiet so have had no replies. Any ideas?
This is my site, for reference: https://philbrownphotos.com
- The topic ‘[Plugin: YAPB] linking images to previous post’ is closed to new replies.