常用鏈接:
主題下載地址:
https://7b2.com/domain-register/
圖標(biāo):
任務(wù)列表:
域名/task/
邀請(qǐng)碼短代碼:
邀請(qǐng)碼支持短代碼功能,您可以將您的短代碼批量顯示到某個(gè)頁面或者文章中,短代碼:
[zrz_inv?start=4?end=20]
這個(gè)短代碼的作用是顯示一批邀請(qǐng)碼到你的網(wǎng)頁上,支持文章,頁面,公告等等。其中start邀請(qǐng)碼開始的ID,end是邀請(qǐng)碼結(jié)束的ID,這個(gè)ID在邀請(qǐng)碼列表中查看
/zrz_inv?start=4?end=20/
將 / 替換成 [ ] 即可
驗(yàn)證碼數(shù)量自定義
inc/recaptcha.php 文件 14行,這個(gè)6改成你想要的數(shù)字即可!

未登陸用戶,特色圖模糊
編輯主題的 formats.php 的 content.php 的第七行
替換為:
上述代碼


隱藏指定分類并讓不同的VIP可查看
在子主題的functons.php 里面的
//需要隱藏的分類ID,多個(gè)請(qǐng)用英文的逗號(hào)隔開,比如array(4,5,6,7)
$delete_cat = array(384);
//處理隱藏指定內(nèi)容
function usewp_delete_cat($query){
global $delete_cat;
if(is_vip_x()=='0'){
$query->set('category__not_in', $delete_cat);
}
return $query;
}
add_filter('pre_get_posts', 'usewp_delete_cat');
//被隱藏的內(nèi)容跳轉(zhuǎn)404
add_action( 'wp', 'usewp_goto_404' );
function usewp_goto_404(){
if ( is_single() && is_vip_x()=='0') {
global $delete_cat;
$arr_cat = get_the_category(get_the_ID())[0];
if(in_array($arr_cat->term_id,$delete_cat)){
global $wp_query;
$wp_query->set_404();
status_header(404);
}
}
}
function is_vip_x(){
//可查看的VIP
$value = zrz_get_lv(get_current_user_id(),'');
if(in_array($value,array('vip1','vip3')) == true || current_user_can( 'manage_options' ) ){
return '1';
}else{
return '0';
}
}
補(bǔ)充:代碼查看:
代碼
申請(qǐng)微博登陸:
https://open.weibo.com/webmaster/add?tdsourcetag=s_pctim_aiomsg
批量修改文章權(quán)限的方法
下面這段代碼是便利你的文章,然后給這些文章設(shè)置閱讀的權(quán)限,前提是你的文章中有段代碼把需要隱藏的內(nèi)容包裹起來了。
$arg = array(
????'post_type'=>'post',//文章形式是post
????'post_status'=>'publish',//文章狀態(tài)是已發(fā)布
????'posts_pre_page'=>-1
);
$the_query = new WP_Query($arg);
if ( $the_query->have_posts() ) {
????while ( $the_query->have_posts() ) {
????????$the_query->the_post();
????????$id = get_the_id();
????????$res = false;
????????//要設(shè)置的文章ID范圍
????????if($id >=100 && $id <= 3000){
????????????//設(shè)置成登陸可見
????????????$res = update_post_meta($id,'capabilities',array('key'=>'login','val'=>''));
????????????//設(shè)置成需要支付10元
????????????//$res = update_post_meta($id,'capabilities',array('key'=>'rmb','val'=>'10'));
????????????//設(shè)置某些等級(jí)可見
????????????//$res = update_post_meta($id,'capabilities',array('key'=>'lv','val'=>array('vip1','vip2')));
????????????//設(shè)置成需要支付10積分
????????????//$res = update_post_meta($id,'capabilities',array('key'=>'credit','val'=>'10'));
????????}
????????if($res){
????????????echo '設(shè)置成功,id為'.$id;
????????}else{
????????????echo '設(shè)置失敗,id為'.$id;
????????}
????}
????echo '';
????wp_reset_postdata();
} else {
????echo '沒有文章';
}
插件:
美化合集:
站長(zhǎng)方便給個(gè)聯(lián)系方式么,付費(fèi)請(qǐng)教一個(gè)問題!
QQ:1355471563