ThaiSEOBoard.com

พัฒนาเว็บไซต์ => CMS & Free Script => ข้อความที่เริ่มโดย: mudzanakub ที่ 07 พฤษภาคม 2017, 16:51:43



หัวข้อ: [Wordpress] สอบถามเรื่องปัญหาหน้า On page นั้นอ่านภาษาไทยบนเมนูเป็นตัว ?
เริ่มหัวข้อโดย: mudzanakub ที่ 07 พฤษภาคม 2017, 16:51:43
รบกวนสอบถามผู้รู้ทุกท่านด้วยนะครับผม พอดีติดปัญหาเรื่องนี้ไม่รู้ว่าจะแก้ไขตรงส่วนไหนดีครับผม
คือพอดีว่ามันก็อ่านได้เป็นส่วนใหญ่เลยครับ แต่จะมีส่วนที่ไม่สามารถอ่านได้คือในส่วน ตัวอย่างของบทความที่ต้องตัดรูปประโยคมาแสดงครับผม

 (https://www.mx7.com/i/b36/6iBfSa.jpg) (https://www.mx7.com/view2/zQrmOZwU0hOZ7KpD)

 (http://upic.me/i/wr/1494150088505.jpg)

เป็นแบบนี้น่ะครับปัญหาตามภาพตัวอย่าง พอดีหาวิธีแก้ไขแล้วแต่ไม่รู้จริงๆว่ามันอยู่ส่วนไหนน่ะครับผม  :wanwan012: :wanwan012:

ยังไงฝากรบกวนผุ้รู้ด้วยนะครับ ตอนนี้ดูจาก Css แล้วก็เป็น UTF-8 แล้วนะครับแล้วก็ลองใช้ Seed Fonts แล้วก็ยังได้ตามภาพอยู่ครับผม


หัวข้อ: Re: [Wordpress] สอบถามเรื่องปัญหาหน้า On page นั้นอ่านภาษาไทยบนเมนูเป็นตัว ?
เริ่มหัวข้อโดย: iamnotkorr ที่ 07 พฤษภาคม 2017, 19:44:41
ต้องแก้โดยการใช้ php code ตามนี้ครับ ถ้าสงสัยยังไง pm มาได้เลย  :wanwan020:

โค๊ด:
add_filter( 'the_content', 'my_the_content_filter', 20 );
/**
 * Add a icon to the beginning of every post page.
 *
 * @uses is_single()
 */
function my_the_content_filter( $content ) {

    if ( is_single() )
        // Add image to the beginning of each page
        $content = sprintf(
            '<img class="post-icon" src="%s/images/post_icon.png" alt="Post icon" title=""/>%s',
            get_bloginfo( 'stylesheet_directory' ),
            $content
        );

    // Returns the content.
    return $content;
}


หัวข้อ: Re: [Wordpress] สอบถามเรื่องปัญหาหน้า On page นั้นอ่านภาษาไทยบนเมนูเป็นตัว ?
เริ่มหัวข้อโดย: mudzanakub ที่ 09 พฤษภาคม 2017, 15:18:01
ต้องแก้โดยการใช้ php code ตามนี้ครับ ถ้าสงสัยยังไง pm มาได้เลย  :wanwan020:

โค๊ด:
add_filter( 'the_content', 'my_the_content_filter', 20 );
/**
 * Add a icon to the beginning of every post page.
 *
 * @uses is_single()
 */
function my_the_content_filter( $content ) {

    if ( is_single() )
        // Add image to the beginning of each page
        $content = sprintf(
            '<img class="post-icon" src="%s/images/post_icon.png" alt="Post icon" title=""/>%s',
            get_bloginfo( 'stylesheet_directory' ),
            $content
        );

    // Returns the content.
    return $content;
}

ขอบคุณสำหรับความรู้ครับ แต่เดี๋ยว PM ไปถามนะครับผม ลองหาดูแล้วแต่ไม่ทราบจริงๆว่าควรนำไปใส่ไว้ที่ตรงไหนน่ะครับผม  :wanwan011: :wanwan011: