ホームページにスライダーを表示しようとしています... このステートメント<?php include (TEMPLATEPATH . '/featured-narrow.php'); ?>
により、スライダーが表示されます..
私の中に以下のコードが見つかりましたhome.php
:
<?php if ( get_post_meta( $postid, 'post_featcontent', true ) == "Yes" ) { ?>
<?php include (TEMPLATEPATH . '/featured-vids.php'); ?>
<?php } ?
その条件を変更すれば、スライダーを表示できると確信しています...
実際には、その「if」ステートメントでは、2 つの条件が必要です。a) ホームページをチェックし、b)「post_featcontent」の値が「狭い幅のおすすめコンテンツ スライダー」に等しいという条件を満たしていました...
私は以下のように試しました:
if ( is_front_page() && get_post_meta( $postid, 'post_featcontent', true ) == "Narrow Width Featured Content Slider" )
私は a) で成功することができましたが、b) の条件を達成することはできません (ところで、それは WordPress です..しかし、それは私が感じる PHP の疑いです..)
誰か助けてください..?
編集:
$meta_boxes = array(
"layout" => array(
"name" => "layout",
"type" => "select",
"title" => __("Page Layout", "solostream"),
"description" => __("Select a layout for this page/post.", "solostream"),
"post_featcontent" => array(
"name" => "post_featcontent",
"type" => "select",
"title" => __("Add Featured Articles/Posts to This Post", "solostream"),
"description" => __("If you'd like to add featured articles/posts to the top of this post, make your selection below.", "solostream"),
"options" => array(
"No",
"Full Width Featured Content Slider",
"Narrow Width Featured Content Slider")),
);