1
Good morning to you all. For the first time I come to ask for help, after many attempts (I’m a beginner).
I’m looking to list several posts (poste_type called=familia_fish ) by category and subcategory. (I’m trying to take advantage of a loop that’s running on another page that shows all the posts.)
<?php query_posts('familia_peixe_familia=familia_ordem_peixe & showposts= -1 & orderby=title');?>
<?php if (have_posts()): while(have_posts()) : the_post();?>
<div id="box-categoria-ficha-peixe-conteudo">
<div class="box-categoria-ficha-peixe-conteudo-faixa">
<div class="h3-ficha-peixe-22"><?php if (get_post_meta($post->ID, 'classificacao_peixe_ordem', true)):?><a href="<?php $key="classificacao_peixe_ordem";echo get_post_meta($post->ID, $key, true);?>" title="<?php echo get_post_meta( $post->ID, 'familia_peixe_ordem', true ); ?>" >Lista ordem dos : <?php if (get_post_meta($post->ID, 'classificacao_peixe_ordem', true)){echo get_post_meta( $post->ID, 'classificacao_peixe_ordem', true );} ?></a><?php endif?></div>
</div>
<div class="box-categoria-ficha-peixe-conteudo-titulo"><?php the_title();?></div>
<div class="box-categoria-ficha-peixe-conteudo-texto"> <?php echo excerpt(80); ?>
</div>
<?php endwhile; else:?>
<?php endif;?>
Thank you Ricardo. The problem I had, but it wasn’t 100% a problem was that I was willing to make the sub-categories below each mother category. The code as written worked well, but not by the right hierarchy. I could not do as I wanted 100%, but I could solve another way. Thanks again for the help
– Celestino Neves