アフィリエイト広告を利用しています

広告

posted by fanblog

2015年07月01日

Wordpress の「カスタムフィールド」を広告領域として使う、の続き(Related Postsとの関係)

Wordpress の「カスタムフィールド」を広告領域として使う=WAFとの格闘」の続き。
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();
この記事へのコメント
コメントを書く

お名前:

メールアドレス:


ホームページアドレス:

コメント: 必須項目

※ブログオーナーが承認したコメントのみ表示されます。

この記事へのトラックバックURL
https://fanblogs.jp/tb/3868760
※ブログオーナーが承認したトラックバックのみ表示されます。

※言及リンクのないトラックバックは受信されません。

この記事へのトラックバック






ファン
検索
検索
<< 2015年10月 >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
最新記事
最新コメント
月別アーカイブ
























×

この広告は30日以上新しい記事の更新がないブログに表示されております。