Search code examples
phpwordpresswordpress-themingcategoriespermalinks

Is there a way to get a category's name in lowercase?


I am setting up a Wordpress theme and I'm integrating a facebook "Like" button into each of the categories.

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.

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.

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.

Any help would be great.


Solution

  • strtolower