Function e listagem de Categorias ou Taxonomy com imagens de tamanhos personalizados.
Plugin usado: http://wordpress.org/plugins/categories-images/
Function e listagem de Categorias ou Taxonomy com imagens de tamanhos personalizados.
Plugin usado: http://wordpress.org/plugins/categories-images/
<?php | |
function cs_last_posts_json() { | |
$json = array(); | |
$last_posts = get_posts( array( | |
'posts_per_page' => 5, | |
'post_type' => 'post' | |
) ); | |
foreach ( $last_posts as $post ) { |
<?php | |
add_filter('the_posts', 'show_future_posts'); | |
function show_future_posts($posts) | |
{ | |
global $wp_query, $wpdb; | |
if(is_single() && $wp_query->post_count == 0) | |
{ | |
$posts = $wpdb->get_results($wp_query->request); |