有没有办法以小写形式获得类别名称? [英] Is there a way to get a category's name in lowercase?
问题描述
我正在设置Wordpress主题,并将Facebook"Like"按钮集成到每个类别中.
I am setting up a Wordpress theme and I'm integrating a facebook "Like" button into each of the categories.
我需要一种以小写形式获取当前页面URL的方法,以便为所有类别提供几个类似的按钮,而每个按钮都有不同的url链接.
I need a way of getting the current page URL in lowercase so I can have several like buttons for all the categories while each having different url links.
当前,当我在类别模板中使用<?php get_permalink( ); ?>
或<?php the_permalink( ); ?>
时,它将输出URL以及第一篇文章的永久链接,这不是我当前想要的.
Currently, when I use <?php get_permalink( ); ?>
or <?php the_permalink( ); ?>
in the category template, it outputs the URL plus the permalink of the first post, which isn't what I want currently.
我尝试使用,但是它输出的标题带有第一个字母的上限.我需要使用小写的类别名称来使URL有效,以便将每个类别页面链接到facebook.
I've tried using but it outputs the title with the first letter Capped. I need the category name in lowercase for the URL to be valid in order to link each category page to facebook.
任何帮助都会很棒.
推荐答案
这篇关于有没有办法以小写形式获得类别名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!