How to bring with a query some post

0

Hi, I'm putting together this site and in the part of all the courses, I need to generate a query where I bring or call all the post of the courses I'm uploading. For that also generate some categories with their corresponding post. For example Radan Course (category) the name of the taxonomy is category-courses and the post would be RADPUNCH ESSENTIAL How should I implement it?

            <?php 
                  $query_cursos = array(
                   'post_type'   =>  'post',
                   'orderby'     =>  'meta_value_num',
                   'order'       =>  'DESC',
                   'showposts'   =>   4, 
                    );
                    $wp_query_cursos = new WP_Query( $query_cursos );

                      if ($wp_query_cursos-> have_posts ()) {
                         $contador=0;
                        while ($wp_query_cursos-> have_posts ()) {
                          $wp_query_cursos-> the_post ();               
            ?>                 
				<div id="accordion-container">

					<h2 class="accordion-header ">
					<?php cortarTexto(get_the_title(  ), 100,"...") ?>
						mariano andres
					</h2>

					<div class="accordion-content" >					
						<ul class="icons longarrowlist">							           	
							<li>
								<a href="<?php the_permalink(); ?>">
									<b class="colortext">
									<?php the_sub_field('texto'); ?>
									</b>
								</a>
							</li>
                		</ul>
					</div>
				</div>
			 <?php } }?>
    
asked by MarianoF 12.04.2018 в 16:10
source

0 answers