“Postagens de exibição PHP por categoria no WordPress” Respostas de código

categoria get_posts

$defaults_param = array(
				'numberposts'      	=> -1,
				'post_type'        	=> 'post',
				'category' 			=> 40 ,
				'suppress_filters'	=> false
			);
$get_featured_post = get_posts($defaults_param);
Thoughtful Tapir

Obtenha postagens do WordPress por nome da categoria ..!

<?php query_posts('category_name=CATEGORYNAME&showposts=5');

while (have_posts()) : the_post(); ?>

the_title();   // To display the title of all posts that have category name selected 

the_content();   // To display the content of all posts that have category name selected 


<?php endwhile; ?>
Loreto

Postagens de exibição PHP por categoria no WordPress

$espbc = get_sub_field('add_posts_by_category');
        
        $defaults_param = array(
          //'numberposts'      	=> -1,
          'post_type'        	=> 'post',
          'category' 			    => $espbc,
          'posts_per_page' 			    => 6,
          'suppress_filters'	=> false
        );
        $catPost = get_posts($defaults_param);
Energetic Eagle

Respostas semelhantes a “Postagens de exibição PHP por categoria no WordPress”

Perguntas semelhantes a “Postagens de exibição PHP por categoria no WordPress”

Mais respostas relacionadas para “Postagens de exibição PHP por categoria no WordPress” em PHP

Procure respostas de código populares por idioma

Procurar outros idiomas de código