Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pgapepper

    (@pgapepper)

    I skimmed through the code a couple of times and didn’t see missing close. Either way, you are a rockstar and I owe you a beer. Viewing the source code after the fix, all pages are assigned the appropriate body classes. Again, thanks for all your help – I owe you big!

    Thread Starter pgapepper

    (@pgapepper)

    Leaving the following in:

    if (apply_filters('thematic_show_bodyclass',TRUE)) {
        Creating the body class
        ?>

    (or taking it out – either way it makes no difference)
    and replacing <body class="<?php thematic_body_class() ?>"> with

    <?php if($post->post_parent)
    {  $ancestors=get_post_ancestors($post->ID);
       $root=count($ancestors)-1;
       $parent = $ancestors[$root];
       $top_page = get_post($parent); }
    else
    { $top_page = $post; }
    $top_page_name = $top_page->post_name;
    if ( $top_page_name != 'school' && $top_page_name != 'early-childhood-education' ) $top_page_name = 'trinity';
    ?>
    <body<?php if($top_page_name) { echo ' class="' . $top_page_name . '"'; ?>>

    results is the following error:

    Parse error: syntax error, unexpected $end in ……/wp-content/themes/thematic/header.php on line 96

    As an aside, I am oviously using the thematic theme as a framework (I also changed the naming conventions of the classes to match page slugs already in place). Thanks again for all of your help.

    Thread Starter pgapepper

    (@pgapepper)

    Thanks for the quick response, alcymyth. The site is currently located at trinity.versiostudios.com while it’s being built and sandboxed. I should have included the url (sorry) in the original post. I’ll try and implement your solution, but what would happen if the .church class needs to apply to all pages, except those specified as parent/child of posts 30 or 32? Grandchildren will exist also. I would think it’d be a simple if / elseif / else, right?

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