• Image 01

  • Image 01

  • Image 01

  • Image 01

i nostri bilanci

Bilanci

[insert_php] $args = array( ‘numberposts’ => 10, ‘category’ => 34, ‘orderby’ => ‘post_date’, ‘order’ => DESC); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ global $wpdb; $post_id=$recent[“ID”]; $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post_id), ‘thumbnail’); $title_post = $recent[“post_title”]; $title_exc = substr($title_post, 0, strpos($title_post, ‘ ‘, 45)); $author_id = $recent[“post_author”]; $author_post = get_the_author_meta(‘nickname’, $author_id); $perma = get_permalink($post_id); $date_post = get_the_time(‘j F, Y’,$post_id); $numposts = $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = ‘$post_id'”); echo ‘

‘.$title_post.’

‘; } [/insert_php]