Todas las entradas

[insert_php]
if ( is_front_page()){
?> /i’, $post->post_content, $matches);
$first_img = $matches[1][0];

if(empty($first_img)) {
$first_img = «/path/to/default.png»;
}
return $first_img;
}
//El siguiente codigo comentado devuelve todas las categorias el numero de post por categoria eel id y la descripcion
/*$args = array(
‘orderby’ => ‘name’,
‘order’ => ‘ASC’
);
$categories = get_categories($args);
foreach($categories as $category) {
echo ‘

Category: Categoría: ‘, esc_url( get_permalink())), ‘ – Visto ‘.number_format($post->views, 0, «,», «.»).’ veces.

‘);

//the_content();
//Busca una image en el contenido y la muestras
/*$matches = array();
$first_img = »;
ob_start();
ob_end_clean();
$output = preg_match_all(‘//i’, $post->post_content, $matches);
$first_img = $matches[1][0];
if(empty($first_img)) {
//$first_img = «/path/to/default.png»;
}else{
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.