[Plugin: Yet Another Related Posts Plugin] related_posts() vs. get_related_posts()
-
Hi,
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?
Cheers,
Asger
-
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 – I just released a beta of the next revision (3.0 beta 1) and even wrote a tutorial on the new theming feature, including a section on how to work with YAPB. I hope that helps!
Wohoo! You’re my new best friend!
@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.
@bukselak, can I post a link to your blog as an example of this YAPB functionality on that templating article of mine? Better yet, can you leave a comment on my blog (http://www.hurl.ws/k72) with a link to your blog? I think it’ll be helpful for others to see the possibilities. Thanks!
Done π
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)
Mitcho…
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?
Thanks
SebastianSebastian, 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.