WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Yet Another Related Posts Plugin] related_posts() vs. get_related_posts() (18 posts)

  1. bukselak
    Member
    Posted 5 years ago #

    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

  2. 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.

  3. bukselak
    Member
    Posted 5 years ago #

    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?

  4. @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!

  5. bukselak
    Member
    Posted 5 years ago #

    Wohoo! You're my new best friend!

  6. @bukselak - Glad to hear. Please let me know how that YAPB template works for you, or if I can make it better. :)

  7. bukselak
    Member
    Posted 5 years ago #

    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...

  8. @bukselak - wow, that looks great! I'm so glad that's working out for you.

  9. @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!

  10. bukselak
    Member
    Posted 5 years ago #

    Done ;)

  11. Fjiorea
    Member
    Posted 5 years ago #

    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.

  12. bukselak
    Member
    Posted 5 years ago #

    @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 :)

  13. @Fjiorea - what problems were you having with the code bundled in the beta? Was that from the latest beta? (beta 4)

  14. xXSebaSXx
    Member
    Posted 5 years ago #

    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
    Sebastian

  15. 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/

  16. Rana Mansoor Akbar Khan
    Member
    Posted 4 years ago #

    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/

  17. ipotpal
    Member
    Posted 4 years ago #

    I've tried couple of plugins for related post, but the problem is that none of them show any posts.

    you can see any post in my blog here:

    http://ipotpal.datacenter.bg

    Related posts are just not showing

  18. ipotpal bg
    Member
    Posted 4 years ago #

    It works great for me

Topic Closed

This topic has been closed to new replies.