Related Games

[insert_php]
global $post;
$n = 0;
$maxCols = 3;

$args = array(
‘posts_per_page’ => -1,
‘offset’ => 0,
‘category’ => »,
‘category_name’ => ‘actionscript-juegos’,
‘orderby’ => ‘title’,
//’orderby’ => ‘post_date’,
‘order’ => ‘ASC’,
‘include’ => »,
‘exclude’ => »,
‘meta_key’ => »,
‘meta_value’ => »,
‘post_type’ => ‘post’,
‘post_mime_type’ => »,
‘post_parent’ => »,
‘post_status’ => ‘publish’,
‘suppress_filters’ => true);

//echo ‘ ‘;
//echo ‘

Categoría: ‘, esc_url( get_permalink() ) ), ‘

‘ );
//the_content();
//Busca una image en el contenido y la muestras
$matches = array();
$first_img = »;
ob_start();
ob_end_clean();
$mipostcontent = $post->post_content;
//$output = preg_match_all(‘//i’, $mipostcontent, $matches); //Esto funciona tambien
//$first_img = $matches[1][0];
$pos = strpos($mipostcontent, ‘[e]’);
$contentinfo =»No data for this post»;
if($pos!==false){
$contentinfo = substr($mipostcontent,0,$pos);
}

echo ‘

‘;
echo ‘

‘;
echo ‘‘;
echo $contentinfo;
echo ‘
‘;
echo ‘

‘;
//if(empty($first_img)) {
//$first_img = «/path/to/default.png»;
//echo «No Image»;
// }else{
// echo ‘‘;
// echo ‘‘;
// echo ‘
‘;
// }
echo ‘

‘;
}

//$myposts = get_posts(‘numberposts=-1’);
$post = null;
[/insert_php]

Deja una respuesta

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.