VPS侦探论坛

 找回密码
 注册
查看: 5076|回复: 4

lnmp安装wordpress后有一个函数无法运行,新手请教。。。。。

[复制链接]
发表于 2014-1-20 09:55:38 | 显示全部楼层 |阅读模式

lnmp正常安装wp后,安装了一个主题,但是网页源码无法显示keywrods和description的meta项。。主题的keywords和description
是用一个函数调用的,但是实在不知道这个是什么函数,为什么这个功能无法实现。。。。是不是lnmp把某个函数给禁用了?


代码如下:
  1. //关键字
  2. function deel_keywords() {
  3.   global $s, $post;
  4.   $keywords = '';
  5.   if ( is_single() ) {
  6.         if ( get_the_tags( $post->ID ) ) {
  7.           foreach ( get_the_tags( $post->ID ) as $tag ) $keywords .= $tag->name . ', ';
  8.         }
  9.         foreach ( get_the_category( $post->ID ) as $category ) $keywords .= $category->cat_name . ', ';
  10.         $keywords = substr_replace( $keywords , '' , -2);
  11.   } elseif ( is_home () )    { $keywords = dopt('d_keywords');
  12.   } elseif ( is_tag() )      { $keywords = single_tag_title('', false);
  13.   } elseif ( is_category() ) { $keywords = single_cat_title('', false);
  14.   } elseif ( is_search() )   { $keywords = esc_html( $s, 1 );
  15.   } else { $keywords = trim( wp_title('', false) );
  16.   }
  17.   if ( $keywords ) {
  18.         echo "\n";
  19.   }
  20. }
复制代码

[ 本帖最后由 hautbbs 于 2014-1-20 18:31 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2014-1-20 10:55:04 | 显示全部楼层


禁用的函数再置顶帖 https://bbs.vpser.net/thread-7649-1-1.html 上有说明
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2014-1-20 18:33:54 | 显示全部楼层

原帖由 licess 于 2014-1-20 10:55 发表
禁用的函数再置顶帖 https://bbs.vpser.net/thread-7649-1-1.html 上有说明

关键是不知道这个具体是什么函数?
能否帮忙分析一下这个是什么函数,谢谢了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2014-1-24 09:53:02 | 显示全部楼层



哪位高人帮忙分析一下这个是什么函数,谢谢了。。。。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2014-1-24 10:40:23 | 显示全部楼层

就禁用了那几个函数去掉了试试,或挨着去了试试不就知道了

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-25 09:33 , Processed in 0.026193 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表