Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/04/2012, 03:35
arquidea
 
Fecha de Ingreso: abril-2009
Mensajes: 233
Antigüedad: 15 años, 1 mes
Puntos: 5
Respuesta: Relacionar imágenes con post wordpress

Gracias Nekko, a partir de tu comentario encontre un script que que incluía el post y las imágenes, a partir de ahí lo modifiqué a mi gusto.

Dejo e código por que seguro que le servirá a alguien:

Código PHP:
<?php
require_once($_SERVER 'DOCUMENT_ROOT'].'/wp-config.php');
$my_query = new WP_Query('showposts=3');
while (
$my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate $post->ID;
?>

    <li><a href="<?php the_permalink() ?>" target="_blank" rel="bookmark" class="titulopost">
    <?php the_title(); ?></a>
    
<?php 
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
  
the_post_thumbnail( array(100,100) );

?>

           <p>
           
   <?
$content 
get_the_excerpt();

$MaxLENGTH=150;
$TextoResumen substr($content,0,strrpos(substr($content,0,$MaxLENGTH)," "));
echo 
$TextoResumen." …";

?>