Wordpress Custom Post Types and fields -


i have 2 custom post types…

book , book author.

i want to…

list book's author on respective author page.

so if have 10 books stephen king. want list them (and him) on stephen king page. having real trouble working out how query posts this.

any advice? using advanced custom fields plugin if helps, can't work out how query , display post information.

i use following code display of releases, how specific ones on specific author pages?

<?php      $args=array(      'post_type' => 'book',      'post_status' => 'publish',      'posts_per_page' => 12,      'caller_get_posts'=> 1,      'orderby'=> 'date',      'order' => 'desc'      );      $my_query = null;      $my_query = new wp_query($args);      if( $my_query->have_posts() ) {      echo '';      $i = 0;      while ($my_query->have_posts()) : $my_query->the_post();      if($i % 6 == 0) { ?> <div class="row">     <?php } ?>  <img src="<?php the_field('cover_image'); ?>" /><br /> <?php the_field('author_name'); ?><br /> <?php the_title(); ?><br />  </div>  <?php     if($i % 6 == 0) { ?>   <?php }  $i++; endwhile;  }  wp_reset_query(); ?> 

i did similar, but...

main problem here is, how categorizing books? did create taxonomies that? , taxonomies in fact author´s names? mean, how sincronize tell book belong author?


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -