wordpress手机移动端页面内容判断函数-WordPress主题

摘要:如何在使用的wordpress主题里面添加手机端判断函数来区别不同平台加载不同页面代码呢,首先需要大家了解一点,word…

如何在使用的wordpress主题里面添加手机端判断函数来区别不同平台加载不同页面代码呢,首先需要大家了解一点,wordpress从3.5版起就已经在wp程序内部集成了移动设备判断检测函数,不需要大家在另外添加和集成了。

那手机端我们可以通过( wp_is_mobile()来判断不同的访问平台,下面的代码很实用,用来双重判断wordpress主题的,移动端显示项及非移动端显示项。

来源:http://www.wazhuti.com/1801.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_13017.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?