[jquery] visualizzare miniature al caricamento di un’immagine! Creare un effetto tipografico con illustrator e photoshop!




Mar 14

Per aggiungere post correlati nel vostro blog, copiate e incollate questo codice PHP nella pagina “single.php”.

 
< ?php
$original_post = $post;
$tags = wp_get_post_tags($post->ID);
if($tags)
{
echo
Related Posts
 
;
$sendTags = array();
foreach($tags as $tag)
$sendTags[] = $tag->term_id;
 
$args = array(
‘tag__in’ => $sendTags,
‘post__not_in’ => array($post->ID),
’showposts’ => 5,
‘caller_get_posts’ => 1,
);
 
$queryDb = new WP_Query($args);
if($queryDb->have_posts())
{
echo

    ‘;
    while ($queryDb->have_posts()) {
    $queryDb->the_post();
    ?>

  • ">
    < ?php the_title(); ?>
  •  
    < ?php
    }
    echo

 
‘;
}
}
$post = $original_post;
wp_reset_query();
?>

 

fonte: www.sastgroup.com » Vai al post originale





Scrivi un commento