ThemeShaper Forums » Thematic

[closed]

Adding a dynamic post class

(4 posts)
  • Started 12 years ago by helgatheviking
  • Latest reply from helgatheviking
  • This topic is resolved

Tags:

  1. I thought this would be similar to a function i wrote once for the body classes, but no joy.

    //filter thematic_post_class to add clearfix
    function clearfix_post($c){
    	$c[] = 'clearfix';
    	return $c;
    }
    add_filter('thematic_post_class','clearfix_post');

    any reason why the above should add "clearfix" to the post class?

    Posted 12 years ago #
  2. i'm losing my mind... that works just fine filtering the body classes.. they look like they should be the same.

    Posted 12 years ago #
  3. Hi Kathy,

    As a general rule when you're running into issues with filtering a function or hooking into Thematic, look at the source code for the function you're trying to filter or hook into.

    Try:

    add_filter('post_class','clearfix_post');

    It looks like this never got Thematicized from its Sandbox roots

    -Gene

    Posted 12 years ago #
  4. BLESS YOU GENE!! i saw the thematic_post_class() function and thought I could filter that exactly the same way as i did with the thematic_body_class.

    just what i needed!

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.