ThemeShaper Forums » Thematic


add classes to the divs

(4 posts)
  • Started 12 years ago by greenandi
  • Latest reply from greenandi
  • This topic is resolved
  1. hi guys,
    just want to make sure a thing..

    it would be nice if we can add classes to the divs for styling purposes.
    what i did was using function to remove the brandingopen 1 to remove the div="branding" and re-create it again by adding class="some class"

    function remove_brandingopen() {
    remove_action('thematic_header', 'thematic_brandingopen',1);
    add_action('init', 'remove_brandingopen');

    function add_brandingopen() {
    echo "<div id=\"branding\" class=\"some class\">\n";
    add_action('thematic_header', 'add_brandingopen',1);

    am i in the right track ?
    or are there any better way to add classes ? do i should edit the thematic's php file ?
    what if i wanted to add class to div access, main, content, and so on...


    Posted 12 years ago #
  2. This is exactly how you'd want to do it with Thematic These functions should go in your child theme's functions.php file. You should not ever need to edit any of Thematics files directly.

    Posted 12 years ago #
  3. but why? unless you are going to create multiple brandings i don't see the point. you should be able to style branding just fine by its ID.

    that said, you are on the right track. and just to echo gene... hands off the thematic files!

    Posted 12 years ago #
  4. yup, thanks guys. it solved

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.