0

私はそれを取得しません、私はカスタム wp テンプレートに持っています:

single-usedcar_model-reader_review.php,

single-usedcar_model-gallery.php

しかし、何らかの理由で

get_template_part('中古車モデル', "ギャラリー");

いつでも機能し、正しく含まれています。

reader_review で同じことをしようとすると、エラーが発生します。それらのファイルを含めるために何か特別なものを定義する必要がありますか?

私が得ているエラーは次のとおりです。

This is somewhat embarrassing, isn’t it?

object(WP_Query)#809 (46) { ["query_vars"]=> array(55) { ["attachment"]=> string(14) "reader_reviews" ["error"]=> string(0) "" [ "m"]=> int(0) ["p"]=> int(0) ["post_parent"]=> string(0) "" ["subpost"]=> string(0) "" ["subpost_id "]=> string(0) "" ["attachment_id"]=> int(0) ["name"]=> string(14) "reader_reviews" ["static"]=> string(0) "" [" pagename"]=> string(0) "" ["page_id"]=> int(0) ["second"]=> string(0) "" ["分"]=> 文字列(0) "" ["時"]=> 文字列(0) "" ["日"]=> int(0) ["月数"]=> int(0) ["年" ]=> int(0) ["w"]=> int(0) ["category_name"]=> string(0) "" ["tag"]=> string(0) "" ["cat"]= > string(0) "" ["tag_id"]=> string(0) "" ["author_name"]=> string(0) "" ["feed"]=> string(0) "" ["tb" ]=> string(0) "" ["paged"]=> int(0) ["comments_popup"]=> string(0) "" ["meta_key"]=>string(0) "" ["meta_value"]=> string(0) "" ["preview"]=> string(0) "" ["s"]=> string(0) "" ["sentence"] => 文字列(0) "" ["フィールド"]=> 文字列(0) "" ["category_in"]=> array(0) { } ["category _not_in"]=> array(0) { } ["category_ and"]=> array(0) { } ["post _in"]=> array(0) ) { } ["post__not_in"]=> array(0) { } ["tag_ in"]=> array(0) { } ["tag_not_in"]=> array(0) { } ["tag__and"]=> array(0) { } ["tag_slug__in"]=> array(0) { } ["tag_slug__and"]=> array(0) { } ["ignore_sticky_posts"]=> bool(false) ["suppress_filters"]=> bool(false) ["cache_results"]=> bool(true) ["update_post_term_cache"]=> bool(true) ["update_post_meta_cache"]= > bool(true) ["post_type"]=> string(0) "" ["posts_per_page"]=> int(1) ["nopaging"]=> bool(false) ["comments_per_page"]=> string(2 ) "50" ["no_found_rows"]=> bool(false) ["order"]=> string(4) "DESC" } ["tax_query"]=> NULL ["meta_query"]=> object(WP_Meta_Query)#551 (2) { ["queries"]=> array(0) { } ["relation"]=> NULL } ["post_count"]=> int(0) ["current_post"]=> int(-1) ["in_the_loop"]=> bool(false) ["comment_count"]= >
int(0) ["current_comment"]=> int(-1) ["found_posts"]=> int(0) ["max_num_pages"]=> int(0) ["max_num_comment_pages"]=> int(0)
[ "is_single"]=> bool(false) ["is_preview"]=> bool(false)
["is_page"]=> bool(false) ["is_archive"]=> bool(false)
["is_date"]=> bool(false) ["is_year"]=> bool(false)
["is_month"]=> bool(false) ["is_day"]=> bool(false)
["is_time"]=> bool(false) [" is_author"]=> bool(false)
["is_category"]=> bool(false) ["is_tag"]=> bool(false)
["is_tax"]=> bool(false) ["is_search"]=> bool(false)
["is_feed"]=> bool(false) ["is_comment_feed"]=> bool(false)
["is_trackback"]=> bool(false) ["is_home"]=> bool (間違い)
["is_404"]=> bool(true) ["is_comments_popup"]=> bool(false)
["is_paged"]=> bool(false) ["is_admin"]=> bool(false)
["is_attachment"]= > bool(false) ["is_singular"]=> bool(false)
["is_robots"]=> bool(false) ["is_posts_page"]=> bool(false)
["is_post_type_archive"]=> bool(false) [ "query_vars_hash"]=>
string(32) "6fd8021e4727db18aa48074428ae7597"
["query_vars_changed"]=> bool(false) ["thumbnails_cached"]=>
bool(false) ["query"]=> array(1) { ["attachment"]=> string(14) "reader_reviews" } ["request"]=> string(160) "SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_name = 'reader_reviews' AND wp_posts.post_type = 'attachment' ORDER BY wp_posts.post_date DESC " ["posts"]=> &array(0) { }
["queried_object"]=> NULL ["queried_object_id "]=> int(0) }

4

0 に答える 0