0
Hello good morning I would like a noose here in this code:
'Object'=> get_the_nome da imagem que esta no destaque()
'Categoria' =>get_the_nome da categoria
follows the complete code :
$args = array( 'post_status' => 'publish');
$loop = new WP_Query( $args );
$array = array();
while ( $loop->have_posts() ) : $loop->the_post();
global $data;
$array[] = array(
'Object'=> 'aqui apenas o nome da imagem destacada',
'Titulo' => get_the_title(),
'Descricao' => get_the_content(),
'Categoria' => 'aqui o nome da categoria',
);
endwhile;
wp_reset_query();
ob_clean();
echo json_encode($array);
exit();
You should explain the question better. Besides, would you have someone do the code for you? This is a website about technical questions, not for people to solve their problem. In other words, you have to show some effort in solving the problem.
– Vinícius Fagundes
The boy everyone puts their codes here and doubts and that’s what I’m doing most I’ve already solved hug there for you too ! for those who have the doubt also follow the code that solved: $filename = basename ( get_attached_file( get_post_thumbnail_id() ) )
– Hemerson Prestes
Code is correct. Ask for help as well. But you need to show some effort. Anyway wordpress.org is a good place to get help on the WP API.
– Vinícius Fagundes
Since you already found the answer. You can answer your own question and help other people ;)
– Vinícius Fagundes