Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support How to get the template part working with WPSP? Reply To: How to get the template part working with WPSP?

#5495
Alberto
Participant

Hi Tom.
Again, I apologize for putting all this code in, but I think it’s clearer.

WP_Query::__set_state(array(
   'query' => 
  array (
    'order' => 'desc',
    'orderby' => 'date',
    'post_type' => 'locuciones',
    'posts_per_page' => 12,
    'paged' => 0,
    'post_status' => 
    array (
      0 => 'publish',
    ),
    'tax_query' => 
    array (
      'relation' => 'AND',
      0 => 
      array (
        'taxonomy' => 'genero',
        'terms' => 'femenino',
      ),
      1 => 
      array (
        'taxonomy' => 'edad',
        'terms' => 'infantil',
      ),
    ),
  ),
   'query_vars' => 
  array (
    'order' => 'DESC',
    'orderby' => 'date',
    'post_type' => 'locuciones',
    'posts_per_page' => 12,
    'paged' => 0,
    'post_status' => 
    array (
      0 => 'publish',
    ),
    'tax_query' => 
    array (
      'relation' => 'AND',
      0 => 
      array (
        'taxonomy' => 'genero',
        'terms' => 'femenino',
      ),
      1 => 
      array (
        'taxonomy' => 'edad',
        'terms' => 'infantil',
      ),
    ),
    'error' => '',
    'm' => '',
    'p' => 0,
    'post_parent' => '',
    'subpost' => '',
    'subpost_id' => '',
    'attachment' => '',
    'attachment_id' => 0,
    'name' => '',
    'static' => '',
    'pagename' => '',
    'page_id' => 0,
    'second' => '',
    'minute' => '',
    'hour' => '',
    'day' => 0,
    'monthnum' => 0,
    'year' => 0,
    'w' => 0,
    'category_name' => '',
    'tag' => '',
    'cat' => '',
    'tag_id' => '',
    'author' => '',
    'author_name' => '',
    'feed' => '',
    'tb' => '',
    'meta_key' => '',
    'meta_value' => '',
    'preview' => '',
    's' => '',
    'sentence' => '',
    'title' => '',
    'fields' => '',
    'menu_order' => '',
    'embed' => '',
    'category__in' => 
    array (
    ),
    'category__not_in' => 
    array (
    ),
    'category__and' => 
    array (
    ),
    'post__in' => 
    array (
    ),
    'post__not_in' => 
    array (
    ),
    'post_name__in' => 
    array (
    ),
    'tag__in' => 
    array (
    ),
    'tag__not_in' => 
    array (
    ),
    'tag__and' => 
    array (
    ),
    'tag_slug__in' => 
    array (
    ),
    'tag_slug__and' => 
    array (
    ),
    'post_parent__in' => 
    array (
    ),
    'post_parent__not_in' => 
    array (
    ),
    'author__in' => 
    array (
    ),
    'author__not_in' => 
    array (
    ),
    'ignore_sticky_posts' => false,
    'suppress_filters' => false,
    'cache_results' => true,
    'update_post_term_cache' => true,
    'lazy_load_term_meta' => true,
    'update_post_meta_cache' => true,
    'nopaging' => false,
    'comments_per_page' => '50',
    'no_found_rows' => false,
    'taxonomy' => 'genero',
    'term_id' => 'femenino',
  ),
   'tax_query' => 
  WP_Tax_Query::__set_state(array(
     'queries' => 
    array (
      'relation' => 'AND',
      0 => 
      array (
        'taxonomy' => 'genero',
        'terms' => 
        array (
          0 => 'femenino',
        ),
        'field' => 'term_id',
        'operator' => 'IN',
        'include_children' => true,
      ),
      1 => 
      array (
        'taxonomy' => 'edad',
        'terms' => 
        array (
          0 => 'infantil',
        ),
        'field' => 'term_id',
        'operator' => 'IN',
        'include_children' => true,
      ),
    ),
     'relation' => 'AND',
     'table_aliases' => 
    array (
      0 => 'ch1n0_term_relationships',
      1 => 'tt1',
    ),
     'queried_terms' => 
    array (
      'genero' => 
      array (
        'terms' => 
        array (
          0 => 'femenino',
        ),
        'field' => 'term_id',
      ),
      'edad' => 
      array (
        'terms' => 
        array (
          0 => 'infantil',
        ),
        'field' => 'term_id',
      ),
    ),
     'primary_table' => 'ch1n0_posts',
     'primary_id_column' => 'ID',
  )),
   'meta_query' => 
  WP_Meta_Query::__set_state(array(
     'queries' => 
    array (
    ),
     'relation' => NULL,
     'meta_table' => NULL,
     'meta_id_column' => NULL,
     'primary_table' => NULL,
     'primary_id_column' => NULL,
     'table_aliases' => 
    array (
    ),
     'clauses' => 
    array (
    ),
     'has_or_relation' => false,
  )),
   'date_query' => false,
   'request' => 'SELECT SQL_CALC_FOUND_ROWS  ch1n0_posts.ID FROM ch1n0_posts  LEFT JOIN ch1n0_term_relationships ON (ch1n0_posts.ID = ch1n0_term_relationships.object_id)  LEFT JOIN ch1n0_term_relationships AS tt1 ON (ch1n0_posts.ID = tt1.object_id) WHERE 1=1  AND ( 
  ch1n0_term_relationships.term_taxonomy_id IN (62,63,66) 
  AND 
  tt1.term_taxonomy_id IN (64,65)
) AND ch1n0_posts.post_type = \'locuciones\' AND ((ch1n0_posts.post_status = \'publish\')) GROUP BY ch1n0_posts.ID ORDER BY ch1n0_posts.post_date DESC LIMIT 0, 12',
   'posts' => 
  array (
    0 => 
    WP_Post::__set_state(array(
       'ID' => 559,
       'post_author' => '3',
       'post_date' => '2017-07-08 19:25:51',
       'post_date_gmt' => '2017-07-08 19:25:51',
       'post_content' => 'La locución en chino que mostramos a continuación es un ejemplo de introducción histórica narrada por una voz masculina.

历史介绍
[audio mp3="http://traduccioneschino.es/wp-content/uploads/2017/07/Locutor-varon-chino-29.mp3"][/audio]',
       'post_title' => 'Recorrido museo del Prado',
       'post_excerpt' => '',
       'post_status' => 'publish',
       'comment_status' => 'closed',
       'ping_status' => 'closed',
       'post_password' => '',
       'post_name' => 'chino-nativo-demostracion-hombre',
       'to_ping' => '',
       'pinged' => '',
       'post_modified' => '2018-06-28 09:49:06',
       'post_modified_gmt' => '2018-06-28 09:49:06',
       'post_content_filtered' => '',
       'post_parent' => 0,
       'guid' => 'http://traduccioneschino.es/?post_type=locuciones&p=559',
       'menu_order' => 0,
       'post_type' => 'locuciones',
       'post_mime_type' => '',
       'comment_count' => '0',
       'filter' => 'raw',
    )),
    1 => 

and so on till 11 and then:

  'post_count' => 12,
   'current_post' => -1,
   'in_the_loop' => false,
   'post' => 
  WP_Post::__set_state(array(
     'ID' => 559,
     'post_author' => '3',
     'post_date' => '2017-07-08 19:25:51',
     'post_date_gmt' => '2017-07-08 19:25:51',
     'post_content' => 'La locución en chino que mostramos a continuación es un ejemplo de introducción histórica narrada por una voz masculina.

历史介绍
[audio mp3="http://traduccioneschino.es/wp-content/uploads/2017/07/Locutor-varon-chino-29.mp3"][/audio]',
     'post_title' => 'Recorrido museo del Prado',
     'post_excerpt' => '',
     'post_status' => 'publish',
     'comment_status' => 'closed',
     'ping_status' => 'closed',
     'post_password' => '',
     'post_name' => 'chino-nativo-demostracion-hombre',
     'to_ping' => '',
     'pinged' => '',
     'post_modified' => '2018-06-28 09:49:06',
     'post_modified_gmt' => '2018-06-28 09:49:06',
     'post_content_filtered' => '',
     'post_parent' => 0,
     'guid' => 'http://traduccioneschino.es/?post_type=locuciones&p=559',
     'menu_order' => 0,
     'post_type' => 'locuciones',
     'post_mime_type' => '',
     'comment_count' => '0',
     'filter' => 'raw',
  )),
   'comment_count' => 0,
   'current_comment' => -1,
   'found_posts' => '37',
   'max_num_pages' => 4.0,
   'max_num_comment_pages' => 0,
   'is_single' => false,
   'is_preview' => false,
   'is_page' => false,
   'is_archive' => true,
   'is_date' => false,
   'is_year' => false,
   'is_month' => false,
   'is_day' => false,
   'is_time' => false,
   'is_author' => false,
   'is_category' => false,
   'is_tag' => false,
   'is_tax' => true,
   'is_search' => false,
   'is_feed' => false,
   'is_comment_feed' => false,
   'is_trackback' => false,
   'is_home' => false,
   'is_404' => false,
   'is_embed' => false,
   'is_paged' => false,
   'is_admin' => false,
   'is_attachment' => false,
   'is_singular' => false,
   'is_robots' => false,
   'is_posts_page' => false,
   'is_post_type_archive' => true,
   'query_vars_hash' => 'a5de2d5af70eefbca5ead3688a62d3ce',
   'query_vars_changed' => false,
   'thumbnails_cached' => false,
   'stopwords' => NULL,
   'compat_fields' => 
  array (
    0 => 'query_vars_hash',
    1 => 'query_vars_changed',
  ),
   'compat_methods' => 
  array (
    0 => 'init_query_flags',
    1 => 'parse_tax_query',
  ),
))

Hope it can helps…