Ejemplo n.º 1
0
function wptouch_has_related_posts()
{
    $settings = wptouch_get_settings('foundation');
    if (!$settings->related_posts_enabled) {
        return false;
    }
    $related = wptouch_related_posts();
    return is_array($related) && count($related);
}
Ejemplo n.º 2
0
<?php

if (function_exists('wptouch_related_posts')) {
    ?>
	<?php 
    if (wptouch_has_related_posts()) {
        ?>
		<div class="related-posts">
			<h3><?php 
        _e('Related', 'wptouch-pro');
        ?>
</h3>
			<ul class="related">
				<?php 
        $related_posts = wptouch_related_posts();
        ?>
				<?php 
        foreach ($related_posts as $related_post) {
            ?>
				<li class="<?php 
            if ($related_post->thumbnail != '') {
                echo 'has-thumb';
            }
            if ($related_post->excerpt == '') {
                echo ' no-excerpt';
            }
            ?>
">
					<?php 
            if ($related_post->thumbnail != '') {
                echo $related_post->thumbnail;