limemo_take
フォーラムへの返信
2件の返信を表示中 - 1 - 2件目 (全2件中)
-
フォーラム: プラグイン
返信が含まれるトピック: Yet Another Related Posts Pluginについてpopupさん、レスありがとうございます。
>テーマのテンプレートファイルの表示したい箇所に記述していますか?
>(YARPPのテンプレートファイルではありません。)YARPPのテンプレートファイルに記述していましたので、テーマのテンプレートファイルに下記のコードを記述したところカスタムポストタイプの関連記事が表示されるようになりました。
yarpp_related(array( 'post_type' => array('post', 'mycustompost'), 'show_pass_post' => false, // show password-protected posts 'past_only' => false, // show only posts which were published before the reference post // 任意のテンプレートを利用する場合指定 //'template' => 'yarpp-template-xxxxxx.php' // either the name of a file in your active theme or the boolean false to use the builtin template ));バージョン3.5.2b1で確認しました。教えていただきありがとうございました。
フォーラム: プラグイン
返信が含まれるトピック: Yet Another Related Posts Pluginについて自分も同じところで悩んだんですが、結果カスタム投稿タイプの場合はうまく動かなかったです
yarpp_related(array( 'post_type' => array('post', 'mycustompost'), 'show_pass_post' => false, // show password-protected posts 'past_only' => false, // show only posts which were published before the reference post 'exclude' => array(), // a list of term_taxonomy_ids. entities with any of these terms will be excluded from consideration. 'recent' => false, // to limit to entries published recently, set to something like '15 day', '20 week', or '12 month'. )); // third argument: (optional) true to echo the HTML block; false to return it2行目のmycustompostがカスタムポスト名で、上記のコードを追加したのですがダメでした。
もしYet Another Related Posts Pluginを使って、カスタムポストで投稿した記事を関連記事として表示する方法をご存知の方がいたら、教えていただけるとうれしいです。
2件の返信を表示中 - 1 - 2件目 (全2件中)