Hi,
thank you. I’m now testing my theme with the theme check plugin (although I don’t receive any error). However I’m displaying the article inside a modal (I’m trying to use bootstrap with wp). Do you think this might be an issue?
Here’s my code to dispaly the articles
<section id="saleprove" class="bg-gray">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h3 class="service-heading">Sale prove</h3>
</div>
<?php
$args_sp = array( 'numberposts' => '5', 'category_name' => 'saleprove' );
$sp = wp_get_recent_posts( $args_sp );
foreach( $sp as $sala ):
$sala_id = $sala["ID"];
$sala_img_src = get_the_post_thumbnail($sala_id, 'archive_grid');
$sala_title = $sala["post_title"];
$sala_content = get_post_field('post_content', $sala_id);
$col_width = "col-lg-";
switch (count($sp)) {
case 1:
$col_width.= 12;
break;
case 3:
$col_width.= 4;
break;
case 4:
$col_width.= 3;
break;
default:
$col_width.= 6;
break;
}
?>
<div class="<?php echo $col_width." text-center"; ?>"><!-- open -->
<a data-toggle="modal" href="" data-target="#modal-sp-<?php echo $sala_id; ?>">
<div class="round-img">
<img class="img-responsive img-circle" alt="" src="<?php echo $sala_img_src; ?>">
</div>
</a>
<h4><?php echo $sala_title ?></h4>
</div>
<div id="modal-sp-<?php echo $sala_id; ?>" class="modal fade in" aria-hidden="false" role="dialog" tabindex="-1">
<div class="modal-content">
<div class="close-modal" data-dismiss="modal">
<div class="lr">
<div class="rl"> <a href="#">Close</a></div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="modal-body">
<h2><?php echo $sala_title ?></h2>
<hr class="star-primary"> <!--linea separazione orizzontale -->
<img class="img-responsive img-centered img-modal" alt="IMG"
src="<?php echo $sala_img_src; ?>">
<div class=" text-center">
<p><?php echo $sala_content; ?></p>
<h4> title </h4>
</div>
<center> <!-- close -->
<a data-dismiss="modal" class="btn btn-success btn-xl ">Chiudi</a>
</center>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
endforeach;
?>
</div>
</div>
</section>