I’m trying to combine this plug-in with the YAPB (Yet Another Photo Blog)-plugin, so that I can show related photos to each single photo.
To retrieve this I need a way to get the post-objects instead of the outputted xhtml – Something like get_related_posts(). Is this possible?
Hi @bukselak – while this is possible using some custom PHP (see the documentation), it will be *much* easier to do this in the upcoming revision of YARPP which will implement a templating system to let power users uber-customize the way related posts are displayed. For example, you’ll be able to display “related thumnail photos”, for example, if that’s what you want. Stay tuned.
That’s good news. I’m really looking forward to that 🙂 Thanks for a great plugin so far. Do you have a release date allready?
@bukselak – Glad to hear. Please let me know how that YAPB template works for you, or if I can make it better. 🙂
I did a fast, rough implementation at my blog http://www.tegneblog.dk and everything seams to be working properly:) It’s in danish though…
@bukselak – wow, that looks great! I’m so glad that’s working out for you.
Buk, is it possible for you to post a copy of the .php file you modified for the photo to show? the file attached with 3.0 beta dosnt work for me to display the thumbnail. thanks.
@fjiorea – Sure 🙂
<?php if ($related_query->have_posts()):?> <h2>Related</h2> <ol class="related"> <?php while ($related_query->have_posts()) : $related_query->the_post(); ?> <?php if (function_exists('yapb_is_photoblog_post')): if (yapb_is_photoblog_post()):?> <li> <?php if ($post->image): ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent link to <?php the_title(); ?>"> <img src="<?php echo $post->image->getThumbnailHref(array('q=95','wl=65','hp=65')) ?>" alt="<?php the_title() ?>" title="<?php the_title() ?>" /> </a> <?php endif ?> </li> <?php endif; endif; ?> <?php endwhile; ?> </ol> <?php else: ?> <?php endif; ?>
Hope it workes out for you 🙂
@fjiorea – what problems were you having with the code bundled in the beta? Was that from the latest beta? (beta 4)
I’ve been using your YAARP plugin on my blog for a while now. Gotta say, this is the best related posts plugin I’ve tested so far.
I have one question.
I have the YAARP widget on one of my sidebars. This particular sidebar is not really wide (160px). I’ve been trying to figure out a way of getting the [b]stars[/b] for each post to show up in a new line right under the post title, but for the life of me I have not been able to accomplish this.
Can you point me in the right direction?
Sebastian, I’m not exactly sure what you’re looking to do, but by your description this seems to be a CSS issue. Maybe adding some HTML classes and changing those CSS directives will do the trick? I hope so. 🙂
Otherwise, if you need more control, YARPP 3 will introduce the templating feature described in this thread and also here: http://mitcho.com/blog/projects/yarpp-3-templates/
I just submitted a new plug-in for people who need thumbnails with their related posts… have a look. it is good SEO wise and you can customize it at will. http://www.sutlej.net/downloads/best-related-posts/
- The topic ‘[Plugin: Yet Another Related Posts Plugin] related_posts() vs. get_related_posts()’ is closed to new replies.