Os dejo por si acaso los códigos tando de single.php como de index.php. Muchas gracias de antemano y un saludo a todos.
Este es single.php
Código:
  
<?php get_header()?>
	<div id="contentproyecto">
		<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); //The Loop?>
		<div <?php post_class()?>>
			<div class="post-content"><?php the_content()?></div>
			<?php if(has_tag()){the_tags( _e('Keywords','building-blocks') . ': ', ', ');}?>
			<?php wp_link_pages() //Page buttons for multi-page posts?>
	</div>	
	<?php endwhile;endif;?>
    <?php $orig_post = $post;
    global $post;
    $categories = get_the_category($post->ID);
    if ($categories) {
    $category_ids = array();
    foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
    $args=array(
    'category__in' => $category_ids,
    'post__not_in' => array($post->ID),
    'posts_per_page'=> 4, // Number of related posts that will be shown.
    'caller_get_posts'=>1
    );
    $my_query = new wp_query( $args );
    if( $my_query->have_posts() ) {
    echo '<div id="relacionados"><h3>Proyectos relacionados</h3>';
    while( $my_query->have_posts() ) {
    $my_query->the_post();?>
    <div class="brick"><a href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_post_thumbnail(); ?></a>
    <div class="titulo">
    <h3><a href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
    </div>
    </div>
    <?
    }
    echo '</div>';
    }
    }
    $post = $orig_post;
    wp_reset_query(); ?>
</div>
	<?php get_sidebar()?>
<?php get_footer()?>
Y esta es index.php
Código:
  
Por si lo queréis comprobar in situ, la web sobre la que estoy trabajando es http://jotagreates.com/directorio<?php get_header()?>
	<div id="content">
		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	 		<div class="brick">
				<a href="<?php the_permalink() ?>" rel="bookmark">
 				   <div class="imagen">
			           <?php if (has_post_thumbnail()) {
			 	   the_post_thumbnail(array(215,215));
			           }?>
			           </div>
				   <div class="titulo">
			           <h2><?php the_title(); ?></h2></div></a>
			</div>
		<?php endwhile; endif; ?>
	</div>
</div>
<?php get_footer()?>
Muchas gracias a todos y un saludo
 

