![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
wordpress
wordpress的基础语法和插件使用,以及一些坑
Asshead@493
这个作者很懒,什么都没留下…
展开
-
wordpress 代码设置smtp服务并发送邮件
设置smtpfunction site_smtp( $phpmailer ) { $phpmailer->Mailer = 'smtp'; $phpmailer->Host = 'smtp.163.com';//邮件服务器地址 $phpmailer->SMTPAuth = true; $phpmailer->Port = '465';//邮件服务器端口 $phpmailer->SMTPSecure = 'ssl'; $phpmailer->Username原创 2021-03-10 23:41:50 · 418 阅读 · 0 评论 -
wordpress 设置和显示文章浏览次数
<?php /*显示文章浏览次数*/function getPostViews($postID){$count = get_post_meta($postID,'views', true);if($count==''){delete_post_meta($postID,'views');add_post_meta($postID,'views', '0');return "0";}return $count.'';}function setPostViews($postID) {原创 2021-02-25 09:28:20 · 807 阅读 · 0 评论 -
wordpress语法
1.获取当前语言get_bloginfo('language') == 'zh-CN')2.判断页面 is_page( int|string|array $page = '' ) 其中$page(int | string | array) (可选),可以是页面 ID,标题,或其数组,默认值:''。 is_home(); 判断是否是首页3.获取页面的特殊图像获取特色图像:小<?php $thumbnail_image_url = wp_get_attachment_image_原创 2021-01-03 22:05:49 · 412 阅读 · 0 评论 -
wordpress插件集锦
一 分享插件 —sharethis和addthis 这些插件得注册sharthis 插件可以在wordpress 后台安装完插件后进行注册和登录 可以自定义分享按钮的状态但注销sharethis登记的网站 需从sharethis官网去注销登记的网站二 广告插件 adsRotate这款广告插件可以自定义广告 可以设置广告的展示和隐藏 不会占用页面体积,可以设置显示的时间三 下载插件 Download Monitor这款插件可以在wordpress文章编辑器内 进行现在文件的上传 相对于来说还是比原创 2021-01-03 19:36:08 · 437 阅读 · 0 评论