• Resolved nathanagin

    (@nathanagin)


    i was using the previous version of YARPP with the following custom template:

    <br><br><div class="related_posts">
    <h2>If You Liked This, Check Out:</h2><br>
    <?php if ($related_query->have_posts()):?>
    <ul>
        <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
            <?php if (function_exists('has_post_thumbnail')): if (has_post_thumbnail()):?>
    	<li>
    	    <div class="related_thumbnail">
    	        <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail(array(150,150)); ?></a>
    	    </div>
    	    <div style="clear:both;"></div>
    	    <div class="related_permalink">
    	        <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    	    </div>
    	</li>
    	<?php endif; endif; ?>
        <?php endwhile; ?>
    </ul>
    
    <?php else: ?>
        <p>No related photos.</p>
    <?php endif; ?>
    </div>

    this was titled yarpp-template-thumbnail.php

    everything worked perfectly. since the upgrade, though, now only the <h2> title appears – no images, no text.

    I’m using Headway version 2.0.14. and here’s my site: http://www.nonstopawesomeness.com (YARPP available on single post pages).

    i’m pretty simple when it comes to code – i can copy/paste, but i don’t know how to write php files.

    thanks for any help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I just took a look. Looks like the results are working for you on this page:

    http://www.nonstopawesomeness.me/2012/12/moments-of-week-29/

    Thread Starter nathanagin

    (@nathanagin)

    ah – interesting! odd that the home page post does not show anything with my custom template, even though there are related articles (when i’m on the edit page, i see 3 articles listed).

    there are definitely some differences with the upgrade and the custom template:

    -the images are not resized (to 150×150)
    -instead of organized horizontally, they are vertical
    -only 2 posts show instead of 3 (as indicated in the settings)

    if you can shed any light onto why the code above (which did work fine with previous versions) would need to be adjusted, i’d greatly appreciate it!

    to make my life simpler, i’ve chosen the default “thumbnails” setting for now that comes with the system, but i would love a little more customization (in terms of fonts/sizes). 🙂

    thanks so much and keep up the awesome work!!

    Various customizations can be made to the “thumbnails” style by making CSS changes to your own theme’s CSS. I suggest you try that out. The thumbnail size can be varied as well… see the first two items in the readme’s FAQ for more info.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Thumbnail PHP from previous version now not working’ is closed to new replies.