I'm having a problem with this site web on the side of ALL COURSES. I am wanting to bring in the list all the courses that I am uploading in a Post Type called course, for that I assigned some taxonomies (Edgecam, Radan, Apahacam) where I tell which brand that course belongs to. For example, the URL that attached Edgecam Standard Milling that is a course belongs to Edgecam. Although the titles of the drop-down are well placed, I do not know how to bring the titles of the post with its said link ..
The code that armes is the following:
<?php
$terms = get_terms( array(
'taxonomy' => 'categoria-cursos',
'parent' => get_queried_object()->term_id,
'hide_empty' => false,
)
);
foreach ($terms as $termino) {
$posts_array = get_posts(
array( 'showposts' => -1,
'post_type' => 'cursos',
'tax_query' => array(
array(
'taxonomy' => 'categoria-cursos',
'field' => 'name',
'terms' => $termino->name,
)
)
)
);
$posts_array = get_posts($posts_array);
if($posts_array){
?>
<div id="accordion-container">
<h2 class="accordion-header ">
<?php echo $termino->name; ?>
</h2>
<div class="accordion-content" >
<ul class="icons longarrowlist">
<?php foreach ($posts_array as $termino): ?>
<li>
<a href="<?php echo get_term_link($termino); ?>">
<b class="colortext">
<?php echo $termino->post_title; ?>
</b>
</a>
</li>
<?php endforeach ?>
</ul>
</div>
</div>
<?php } ?>
<?php } ?>