Hướng dẫn wordpress popular posts - bài viết phổ biến của wordpress

{text_title}
{summary}
Liên hệ
Đặt mua
< ?php //edit_post_link[ __[ 'Edit', 'twentyeleven' ], '', '' ]; ?> < ?php if[++$count==$cols]{ echo '';$count=0;$new_row=1;} if[$data['is_end_post'] && !$new_row] echo '';   $cont=ob_get_contents[]; ob_end_clean[]; return $cont; } ?>

Ngoài ra có thể sử dụng widget ngoài để hiển thị popular posts. Đặt đoạn code này vào nơi muốn hiển thị

the_widget['WordpressPopularPosts',array[
	'thumbnail'=>array[
		'active'=>'1',
		'width'=>'150',
		'height'=>'150',
		'class'=>'',
		'link_class'=>'product-image'
	],
	'markup'=>array[
		'custom_html'=>'on',
		'post-html-callback'=>'hw_popular_post_cb',
		//'template'=>''
		//'post_html'=>'
{thumb}
{text_title}
',
//'title_length'=>50, 'order_by'=>'views', 'limit'=>get_option['posts_per_page'], 'post-start'=>'',// 'post-end'=>'',// 'wpp-start'=>'', 'wpp-end'=>'', 'title-start'=>'', 'title-end'=>'' ]]];

Ok, vậy là đã xong. Chúc bạn thành công.

Để nhận được bài viết mới vui lòng đăng ký kênh kiến thức WordPress từ A-Z ở Form bên dưới. Bạn cũng có thể nhận được sự trợ giúp trên Twitter và Facebook

Bài Viết Liên Quan

Toplist mới

Bài mới nhất

Chủ Đề