WordPress Excerpt Function Showing CSS #gallery-1

Wordpress Tips & Code Snippets

I had the strangest problem earlier. A client had reported that CSS code was showing on a category page, where only excerpts of a post should be showing. This is what it looked like:

Wordpress Excerpt Function Showing CSS

To cut a long story short, this issue was driving me insane, and I was frantically trying to pin down the cause of the problem. I eventually tracked down the culprit. It was the Events Calender plugin.

If you’ve installed the Events Calender plugin, and you’re experiencing the CSS bug, continue reading, I have a solution for you. If you’re experiencing this problem but DON’T have the plugin installed, I probably don’t have a solution for you. But the root of the problem maybe of a similar nature, as in a plugin you have installed is causing the issue.

The solution for those that have the Events Calender plugin installed

Step 1: Find the file eventcalandar3.php, located in /wp-content/plugins/event-calandar/.

Step 2: Find the following function, ec3_get_the_excerpt.

Step 3:



$text=strip_tags($text, '<style>');

Step 4:
Upload the new eventcalandar3.php file. I would suggest keeping a backup of the original file.

That should have resolved the problem. Phhheeeeew!

Please let me know if this helped anyone. I’m curious to know if this issue has plagued anyone else!


  1. Cengizhan spoke on 25/06/2011

    thanks a lot.
    problem is solved 🙂

  2. jberg1 spoke on 30/06/2011

    You ‘da man!!!. Thanks for this, worked like a charm.

    That Event Calendar Plugin is nice, but a bit squirrely.

Leave a reply

Your email address will not be published. Required fields are marked *