ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์CMS & Free ScriptCode ไฟล์ single.php เป็นแบบนี้จะใส่ adsense ไว้ใต้ Post ยังไง
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: Code ไฟล์ single.php เป็นแบบนี้จะใส่ adsense ไว้ใต้ Post ยังไง  (อ่าน 624 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
noobi
Newbie
*

พลังน้ำใจ: 5
ออฟไลน์ ออฟไลน์

กระทู้: 78



ดูรายละเอียด
« เมื่อ: 05 ตุลาคม 2014, 20:49:56 »

Code ไฟล์ single.php เป็นแบบนี้จะใส่ adsense ไว้ใต้ Post ยังไง ตรงไหน รบกวนผู้รู้ ช่วยทีค่ะ


get_header(); ?>

   <div id="primary" class="content-area">
      <div id="content" class="site-content" role="main">

         <?php
            // Start the Loop.
            while ( have_posts() ) : the_post();

               /*
                * 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() );

               // Previous/next post navigation.
               twentyfourteen_post_nav();

               // If comments are open or we have at least one comment, load up the comment template.
               if ( comments_open() || get_comments_number() ) {
                  comments_template();
               }
            endwhile;
         ?>
      </div><!-- #content -->
   </div><!-- #primary -->

<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();
บันทึกการเข้า
wasantec
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 586
ออฟไลน์ ออฟไลน์

กระทู้: 2,611



ดูรายละเอียด
« ตอบ #1 เมื่อ: 05 ตุลาคม 2014, 21:33:57 »

เปิดไฟล์ content.php ขึ้นมาแล้วก็เอาใส่ไว้ใต้  <?php the_content(  ); ?>
บันทึกการเข้า
gapgag55
สมุนแก๊งเสียว
*

พลังน้ำใจ: 143
ออฟไลน์ ออฟไลน์

กระทู้: 622



ดูรายละเอียด
« ตอบ #2 เมื่อ: 05 ตุลาคม 2014, 21:58:37 »

อีกวิธีครับ

get_header(); ?>

   <div id="primary" class="content-area">
      <div id="content" class="site-content" role="main">

         <?php
            // Start the Loop.
            while ( have_posts() ) : the_post();

               /*
                * 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() );
                 ตำแหน่ง Banner
               // Previous/next post navigation.
               twentyfourteen_post_nav();

               // If comments are open or we have at least one comment, load up the comment template.
               if ( comments_open() || get_comments_number() ) {
                  comments_template();
               }
            endwhile;
         ?>
      </div><!-- #content -->
   </div><!-- #primary -->

<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();
บันทึกการเข้า

หน้า: [1]   ขึ้นบน
พิมพ์