• Hello. I use the plugin Language Switcher on my site. I have a little problem because i want to exclude one category in my post (i mean not to display one category that are listed at the end of each post). The exclusion works but i end with someting that don’t work with the plugin. I need to filter the category name to display them correctly. The plugin page explained how to do sort of but i’m not a good coder. My code :

    <?php foreach((get_the_category()) as $category) {
             if ($category->cat_ID <> '15') { echo apply_filters(’the_category’, $category->cat_name . ' '); }}

    i tried this but it doesn’t work :

    <?php foreach((get_the_category()) as $category) {
             if ($category->cat_ID <> '15') { echo apply_filters(’the_category’, $category->cat_name . ' '); }}

    any help ?

Viewing 1 replies (of 1 total)
  • Thread Starter nlex

    (@nlex)

    it works now with this code
    idon’t even see the difference !

    <?php foreach((get_the_category()) as $category) {
             if ($category->cat_ID <> '15') { echo apply_filters('the_category', $category->cat_name) . ' '; }}

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin : Language Switcher] apply_filters()’ is closed to new replies.