摘要: 在主题functions.php中添加以下代码 /** * add the register record. */ function get_client_ip() { if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP 阅读全文
posted @ 2020-03-16 09:47 venkim 阅读(580) 评论(0) 推荐(0) 编辑
摘要: 以下内容都在主题的functions.php文件写入 1.移除WordPress版本信息 remove_action( 'wp_head', 'wp_generator' ); 2.移除离线编辑器开放接口 remove_action( 'wp_head', 'rsd_link' ); remove_ 阅读全文
posted @ 2020-02-15 15:00 venkim 阅读(955) 评论(0) 推荐(0) 编辑
摘要: 使用wp_enqueue_scripts函数配合wp_head()在header.php中使用 在functions.php文件中添加 function tone_front_script() { wp_enqueue_style( 'css名', get_template_directory_ur 阅读全文
posted @ 2020-02-15 14:19 venkim 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 上一页 <?php $prev_post = get_previous_post(true); if (!empty( $prev_post )): ?> <a href="<?php echo get_permalink( $prev_post->ID ); ?>"></a> <?php endi 阅读全文
posted @ 2020-01-23 13:20 venkim 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 在functions.php文件中添加 排除特定 ID 的文章或页面 //搜索结果排除特定 ID 的文章或页面 function Bing_search_filter_id($query) { if ( !$query->is_admin && $query->is_search) { $query 阅读全文
posted @ 2020-01-21 10:24 venkim 阅读(440) 评论(0) 推荐(0) 编辑
摘要: <?php /** * WordPress 查询综合参考 * 编译:luetkemj - luetkemj.com * * 官方文档: http://codex.wordpress.org/Class_Reference/WP_Query * 源代码: http://core.trac.wordpr 阅读全文
posted @ 2020-01-20 08:45 venkim 阅读(1146) 评论(0) 推荐(0) 编辑
摘要: get_categories()函数可以获得分类所有信息,返回与查询参数相匹配的类别对象数组。变量与wp_list_categories()函数基本一致,且变量可被作为数组传递,也可在查询句法中被传递。 <?php $categories = get_categories( $args ); ?> 阅读全文
posted @ 2020-01-17 11:18 venkim 阅读(1239) 评论(0) 推荐(0) 编辑
摘要: 时间复杂度 阅读全文
posted @ 2020-01-16 20:59 venkim 阅读(98) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>vue的生命周期</title> <script src="./js/vue.js"></script> </head> <body> <div id="app 阅读全文
posted @ 2019-11-26 23:35 venkim 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1.git的结构 工作区 >{add}> 暂存区 >{commit}> 本地库 >{push}> 远程库 远程库 >{clone,pull}>本地库 ps:花括号代表其间的操作方式 ,pull由fetch + merge组成 1.1 初始化 git init 1.2 linux查看隐藏文件 ls - 阅读全文
posted @ 2019-11-14 21:01 venkim 阅读(187) 评论(0) 推荐(0) 编辑