MOD wordpress โม wpกันเถอะ

MOD wordpress โม wpกันเถอะ

MOD wordpress โม wpกันเถอะ

1.เพิ่มบทความล่าสุดไว้ที่ Sidebar

แก้ที่ไฟล์ sidebar ซึ่งให้ใส่โค้ดนี้

<?php wp_get_archives(‘type=postbypost&limit=4′); ?>

2.ปรับ Title Tag ให้ SEO

ทริปนี้เป็นอีกทริปที่ทำง่าย แต่เข้าใจยาก

<?php if ( is_home() ) { ?><? bloginfo(‘name’); ?> | <?php bloginfo(‘description’); ?><?php } ?>
<?php if ( is_search() ) { ?>Search Results for <?php /* Search Count */ $allsearch = &new WP_Query(“s=$s&showposts=-1″); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(”); echo $key; _e(‘ — ‘); echo $count . ‘ ‘; _e(‘articles’); wp_reset_query(); ?><?php } ?>
<?php if ( is_404() ) { ?><? bloginfo(‘name’); ?> | 404 Nothing Found<?php } ?>
<?php if ( is_author() ) { ?><? bloginfo(‘name’); ?> | Author Archives<?php } ?>
<?php if ( is_single() ) { ?><?php wp_title(”); ?> | <?php $category = get_the_category(); echo $category<0>->cat_name; | <? bloginfo(‘name’); ?><?php } ?>
<?php if ( is_page() ) { ?><? bloginfo(‘name’); ?> | <?php $category = get_the_category(); echo $category<0>->cat_name; ?>|<?php wp_title(”); ?><?php } ?>
<?php if ( is_category() ) { ?><?php single_cat_title(); ?> | <?php $category = get_the_category(); echo $category<0>->category_description; ?> | <? bloginfo(‘name’); ?><?php } ?>
<?php if ( is_month() ) { ?><? bloginfo(‘name’); ?> | Archive | <?php the_time(‘F, Y’); ?><?php } ?>
<?php if ( is_day() ) { ?><? bloginfo(‘name’); ?> | Archive | <?php the_time(‘F j, Y’); ?><?php } ?>
<?php if (function_exists(‘is_tag’)) { if ( is_tag() ) { ?><?php single_tag_title(“”, true); } } ?> | <? bloginfo(‘name’); ?>


3.โชว์เอนทรี่ที่คล้ายกัน

อันนี้แก้ในไฟล์ single.php

<!– this displays related posts, based on tags. If there are no tags, then it’ll disappear. Magic!–>
<?php if( function_exists(‘the_tags’) )
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
echo ‘<h2>Related Posts</h2> ‘;
$first_tag = $tags<0>->term_id;
$args=array(
‘tag__in’ => array($first_tag),
‘post__not_in’ => array($post->ID),
’showposts’=>5,
‘caller_get_posts’=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<ul> <li><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></a></li></ul>
<?php endwhile; }}?>


หาที่ใส่กันเองเน้อ ก่อนโค้ด

<?php comments_template(); ?>

4.ทำปุ่มให้คนส่ง entry ขึ้น Twitter

ทริปนี้เรียกได้ว่า อาศัยคนที่เข้ามาดูจริงๆ ซึ่งการทำปุ่มมีวิธีดังนี้
ให้เข้าไปที่ไฟล์ functions.php แล้วใส่โค้ดนี้เพิ่ม

function getTinyUrl($url) {
$tinyurl = file_get_contents(“http://tinyurl.com/api-create.php?url=”.$url);
return $tinyurl;
}


แล้วให้แก้ที่ไฟล์ index.php ของธีม แล้วให้ใส่โค้ดนี้ไว้ที่ไหนก็ได้ ที่อยากจะให้ปุ่มมันอยู่

<?php
$turl = getTinyUrl(get_permalink($post->ID));
echo ‘Share on Twitter: <a href=”http://twitter.com/home?status=Reading this – ‘.$turl.’” title=”Send a link to this article on Twitter” target=”_blank”>Send a link to this on Twitter</a>

?>


ID=868,MSG=977


⭐️ เราให้คำแนะนำปรึกษา รักษาผลประโยชน์ให้ลูกค้า ของเรา
⭐️ เราอยู่เคียงข้างลูกค้าของเรา ช่วยเหลือ ดูแลบริการ
⭐️ เรารองรับช่องทางติดต่อมากมาย สะดวก เข้าถึงง่าย
⭐️ เราดำเนินธุรกิจยาวนานกว่า20 ปี คุณจึงมั่นใจได้
⭐️ คุณมีสามารถรับบริการทั้งจากบริษัทประกันเจ้าของสินค้า และ เรา (ตัวกลาง)

ไทย มีราว 80 บริษัทประกันภัย สินค้าที่แตกต่าง ทั้ง เงื่อนไข ราคา เคลม ความมั่นคง นโยบาย ฯลฯ
ขายผ่านตัวกลาง กว่า 500,000 ราย : ตัวแทน นายหน้า ธนาคาร บิ๊กซี โลตัส ค่ายรถยนต์ เฮ้าส์แบรนด์ ของประกันภัย หรือ ซื้อตรงกับบริษัทเจ้าของสินค้า
⭐️ ตัวอย่าง การบริการ กดดูที่ลิงค์นี้

"สิ่งที่ต้องคำนึงอันดับแรกในการซื้อประกัน คือ ตัวกลางประกันภัย ซึ่งจะเป็นที่ปรึกษา ช่วยเหลือ ดูแลเรา ตลอดอายุกรมธรรม์"

โปรดรอ

display:inline-block; position:relative;
โทร.(จ-ศ : 9-16) เว้นวันหยุดฯ , ลูกค้าเรา บริการ 24/7/365 , Friday เวลา 03:59:52pm ซื้อประกัน 085-911-3737
Copyright © 2018 Cymiz.com., All rights reserved.นโยบาย,ข้อตกลงcymiz.com