Uhla lwemibhalo ye-athikili
Okuningi kweI-plugin ye-WordPressIngabona umsebenzi wokuncoma izindatshana ezihlobene nokuqagela ukuthi yini oyithandayo.
- Inzuzo yama-plugin e-WordPress ukuthi kulula ukuwalungiselela, kodwa angase abe nomthelela othile kuwebhusayithi.
- Ngakho-ke, abantu abaningi basathanda ukusebenzisa ikhodi ye-WordPress ukusebenzisa izindatshana ezihlobene nokuqagela imisebenzi oyithandayo.
- Kodwa ngendlela efanayo, ikhodi yokusebenzisa ama-athikili ahlobene nokuqagela okuthandayo nakho kuyangqubuzana. Ububi bekhodi ukuthi ukucushwa kuyinkimbinkimbi kakhulu.
Izindatshana ezihlobene ne-WordPress ezinconyiwe, qagela ukuthi uthanda amasampula ekhodi
Okulandelayo ukuqagela oyithandayo ikhodi ukuze uthole izindatshana ezihlobene kumathegi nezigaba:
<h3>猜你喜欢</h3>
<ul class="related_posts">
<?php
$post_num = 10; //文章数量
$exclude_id = $post->ID;
$posttags = get_the_tags(); $i = 0;
if ( $posttags ) {
$tags = ''; foreach ( $posttags as $tag ) $tags .= $tag->term_id . ',';
$args = array(
'post_status' => 'publish',
'tag__in' => explode(',', $tags),
'post__not_in' => explode(',', $exclude_id),
'caller_get_posts' => 1,
'orderby' => 'comment_date',
'posts_per_page' => $post_num,
);
query_posts($args);
while( have_posts() ) { the_post(); ?>
<li><a rel="bookmark" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" target="_blank"><?php the_title(); ?></a></li>
<?php
$exclude_id .= ',' . $post->ID; $i ++;
} wp_reset_query();
}
if ( $i < $post_num ) {
$cats = ''; foreach ( get_the_category() as $cat ) $cats .= $cat->cat_ID . ',';
$args = array(
'category__in' => explode(',', $cats),
'post__not_in' => explode(',', $exclude_id),
'caller_get_posts' => 1,
'orderby' => 'comment_date',
'posts_per_page' => $post_num - $i
);
query_posts($args);
while( have_posts() ) { the_post(); ?>
<li><a rel="bookmark" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" target="_blank"><?php the_title(); ?></a></li>
<?php $i++;
} wp_reset_query();
}
if ( $i == 0 ) echo '<li>暂无相关推荐</li>';
?>
</ul>
- phakathi kwazo
$post_num = 10;
iwukubonisa inani lezindatshana ezihlobene njenge-10. - Uma bengekho amathegi nezigaba ekhasini le-WordPress, lizobonisa "Azikho izincomo ezihlobene".
I-WordPress izenza kanjani izixhumanisi ze-athikili efanayo?
Ngokufaka i-plugin ye-ad-inserter, isethelwe ukufaka izincomo ze-athikili efanele kulesi sihloko ngemva kokuqukethwe kwe-athikili (ukufakwa: Ngemva Kokuqukethwe), bese uqagela ukuthi uthanda ikhodi yokusebenza.
I-Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) wabelane "ngekhodi ye-WordPress ukuze kuzuzwe umsebenzi wokuthola nokubonisa izindatshana ezihlobene nokuncoma ukuqagela ukuthi uyayithanda", okuwusizo kuwe.
Siyakwamukela ukwabelana ngesixhumanisi salesi sihloko:https://www.chenweiliang.com/cwl-1987.html
Uyemukelwa esiteshini seTelegram sebhulogi ka-Chen Weiliang ukuze uthole izibuyekezo zakamuva!
📚 Lo mhlahlandlela uqukethe inani elikhulu, 🌟Leli ithuba eliyivelakancane, ungaphuthelwa! ⏰⌛💨
Yabelana futhi uthanda uma uthanda!
Ukwabelana kwakho nokuthanda kwakho kuyisisusa sethu esiqhubekayo!