1.wordpress判断当前分类有没有子分类
wordpress获取当前分类下的子分类
1.将此函数放在你模版的函数中 (wordpress3.8.1是functions.php这个文件)
functionget_category_root_id($cat)
{
$this_category = get_category($cat); // 取得当前分类
while($this_category->category_parent) // 若当前分类有上级分类时,循环
{
$this_category = get_category($this_category->category_parent); // 将当前分类设为上级分类(往上爬)
}
return$this_category->term_id; // 返回根分类的id号
}
2.页面调用 在模板下sidebar.php里修改
?>
2.【谁能帮我写英语小论文1
What factors do you think have an impact on people's personalities? Self-actualization personality become part of our life--- The theory of self-actualization personality is the core of humanistic psychology. However, both humanistic psychology and transpersonal psychology are unaware of the fact that mental depressions have effect on the attainment of self-actualization personality. Mental depression comes into existence in human-being's infant stage and goes through their lifetime. It takes shape due to human-being's suffer from corporal agony, being anesthetized, emotional hurt or some negative impact. This thesis points out the origin, the role and the effect of mental depression. It also makes a preliminary study on the influence of eliminating mental depression. /category/personality-type/。
3.wordpress什么插件可以加友链
进入到管理后台,点击左侧菜单栏的“插件”--“安装插件”在搜索框输入“Link Manager”,点击“搜索”在搜索结果里找到Link Manager,一般是第一个,点击下方的“现在安装”提示是否安装插件,点击“确定”此时系统会自动安装插件,安装完毕后,我们点击下方的”启用插件“此时,在菜单左侧就会显示出“链接”选项,我们点击”添加“在添加链接的页面,我们输入的链接的标题和地址等信息,然后点击右侧的”添加链接“按钮。
链接添加完毕了,如何显示呢,我们可以使用小工具来显示在页面上,点击左侧的菜单的”外观“--”小工具“在小工具页面,把左侧的”链接“选项卡拖放到右侧去此时,会自动弹出一些显示的设置选项,设置完毕后,我们点击”保存“这是我们回到博客主页,就会在右侧看到我们添加的链接了。
转载请注明出处51数据库 » wordpressstudy
模棱22124902