Upgrading to v and body_class in functions.php

Home Forums Using Thematic Child Themes Build Your Own Custom Child Themes Upgrading to v and body_class in functions.php

This topic is: not resolved

This topic contains 18 replies, has 5 voices, and was last updated by  Daniel 7 years, 5 months ago.

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
  • #2485

    Gene (emhr)

    Cool looking site.

    The code that I provided you above is what is necessary for this to work with Thematic And it is an acceptable use of the old filters. As long as you use the add_theme_support functions like I noted those old filters will continue to work.

    So yes, using the body_class and post_class filters is the correct approach *but* it won’t work with the and versions of thematic. This is because version changed thematic_body_class() and thematic_post_class() and as a result introduced a bug. You helped me issue discover the bug and I’m grateful for that because now I can fix it.



    Thx for like my site 🙂 I work many days on it and still making it better if I found good idea.
    But Im very confused about POST_CLASS and BODY_CLaSS. Till today I understood that I should use only “POST_CLASS” from versions and newer. But you telling me use THEMATIC_POST_CLASS.
    In begining of this thread is clearly told that using classes without prefix is correct .

    Could you specify me some article or other discussion where I can better understand what is better use and waht is wrong and WHY? If POST_CLASS is with bugs it will be probubly repaired soon and I shloud use it insteda THEMATIC_POST_ CLASS which is deprecated from version. This is How I understand. AM I WRONG?

    Thank you for explain. Please write so clearly as you can Im not english man. (only learned 🙂 )

    Im glad that I helped you. Its great cooperation 😀


    Gene (emhr)

    Here is what I have discovered from this support topic.

    • There was an issue with the release.
    • The thematic_body_class() and post_class() functions filtered the WP core incorrectly.
    • They replaced the WordPress core classes instead of adding to them.
    • We also deprecated the functions and that has created issues too.

    The legacy dynamic class functions will not be deprecated in the next version. They will be supported and kept in Thematic as a “legacy feature”

    I apologize for the contradictory instructions. This bug will be addressed in the next release. If you want to grab the fix early download it here: https://github.com/ThematicTheme/Thematic/archive/

    With that beta version and all upcoming releases for all 1.X versions of Thematic:

    • You can filter the body_class or post_class and it will work.
    • You can add_theme_support for the legacy_thematic_post_class and legacy_thematic_body_class and filtering the body_class and post_class will work.
    • If you add theme support for thematic’s legacy class you can use the thematic_body_class and thematic_post_class filter hooks.
    • Thematic’s dynamic class functions will not generate deprecated notices.

    What anyone else said before now does necessarily not apply to the current development of Thematic.

    I hope that’s helpful and easy to understand.



    Yea its clear! Thanks Gene!

    We made history! 😀

Viewing 4 posts - 16 through 19 (of 19 total)

The topic ‘Upgrading to v and body_class in functions.php’ is closed to new replies.