新規記事の投稿を行うことで、非表示にすることが可能です。
2015年07月01日
Wordpress の「カスタムフィールド」を広告領域として使う、の続き(Related Postsとの関係)
「Wordpress の「カスタムフィールド」を広告領域として使う=WAFとの格闘」の続き。
WordPress Related Postsを使ってる。そうすると、「Wordpress の「カスタムフィールド」を広告領域として使う=WAFとの格闘」との順番が問題になってしまう。誘導しやすい位置、つまりクリックしてもらいやすい位置は記事本文の末尾、とのことだけれども、WordPress Related Postsも記事本文末尾に「自動挿入」するので、良い塩梅とは言えない。
と思ってたら、WordPress Related Postsの設定に、
WordPress Related Postsを使ってる。そうすると、「Wordpress の「カスタムフィールド」を広告領域として使う=WAFとの格闘」との順番が問題になってしまう。誘導しやすい位置、つまりクリックしてもらいやすい位置は記事本文の末尾、とのことだけれども、WordPress Related Postsも記事本文末尾に「自動挿入」するので、良い塩梅とは言えない。
と思ってたら、WordPress Related Postsの設定に、
Auto Insert Related Posts (or add to your single post template)と書かれてた。これなら自力で好きな位置に挿入出来る…。single.phpに…:
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
get_template_part('bottom-ads-custom-field');
echo '<br/><br/><div class="entry-content">';
wp_related_posts(); // Manual insert `Related Posts'
echo '</div>';
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Previous/next post navigation.
twentyfourteen_post_nav();