• melbell

    (@melbell)


    I am using Chris Cosentino’s Category Icon plugin that can be found here: http://www.ragwings.org/wordpressplugins/cat-icon.phps

    I want to be able to not show the category icons on pages but I’m not sure if there’s any way to do that short of creating a seperate category for all the pages and just not assigning an icon to it.

    Is that my only option?

Viewing 6 replies - 1 through 6 (of 6 total)
  • moshu

    (@moshu)

    Pages do NOT have categories.

    Joshua Sigar

    (@alphaoide)

    Do you have page.php?

    If not, copy and rename index.php to page.php in the same theme directore. Remove template tags (category icon tag) and everything else that you don’t need from page.php

    Thread Starter melbell

    (@melbell)

    I can’t remove category icon tags from the pages, because they aren’t used. The plugin passes “the_content” through a filter to add the icons.

    Is it possible it wrap an if statement around that add_filter line in the plugin or will that break something?

    Thread Starter melbell

    (@melbell)

    Oh, I see that pages don’t have categories…I guess I need to check the plugin and see if it’s defaulting to one of the category images if a category isn’t found.

    Joshua Sigar

    (@alphaoide)

    I believe post in Pages are defaulted to “uncategorized” category. Anyhow

    <?php

    if( !is_page() ) { // if not in Page
    // display the icon
    }

    ?>

    Thread Starter melbell

    (@melbell)

    I just stuck this into the plugin, before the foreach loop.


    if (is_page($content)){
    return $text;
    } else {

    Now it works just like it should.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Remove Category Icon from Pages’ is closed to new replies.