php - ACF Wordpress get posts by category and custom fields -


i have problem acf in wordpress. created own field enter image description here , created own plugin display it, don't know how can display fields. have this:

   wp_reset_postdata();    $myargs = array (       'showposts' => 6    );    $myquery = new wp_query($myargs);      if($myquery->have_posts() ) :        while($myquery->have_posts() ) : $myquery->the_post();    ?>    <p>      <?php the_title(); ?>    </p>    <?php endwhile;          endif;          wp_reset_postdata(); 

and display me posts. want display posts category "raporty" , want display of custom fields.

sorry english ;)

siema kubol,

to show posts post_type 'raporty' add $myargs:

$myargs = array (       'showposts' => 6,       'post_type' => 'raporty'    ); 

in wp loop use e.g. get_field( 'typ_raportu' ). outside loop get_field( 'typ_raportu', post_id_here ).


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -