ThemeShaper Forums » Thematic

[closed]

Losing footer when using custom category template

(4 posts)
  • Started 2 years ago by 4rederick
  • Latest reply from 4rederick
  • This topic is not resolved
  1. At a loss here, guys ...

    Pages that using a custom category template are losing my widget info in the footer.

    View the photography categories to see this ...
    www.josephfrederick.com/photography

    The only thing I can figure out is my use of text widgets in the footer.

    In the first subsidiary aside I have:
    <img src="http://www.josephfrederick.com/wp-content/themes/jf/images/footer-art.png" alt="" align="right" />

    In the second subsidiary aside:
    all content written, designed and coded by joseph frederick &copy copyright 2011
    home blog photography portfolio resumé

    In the third subsidiary aside:
    Search widget

    ...But then again, all the links are pointing to specific links. So is it just that the subsidiary widgets aren't being loaded at all? I don't understand. Help, please!!!

    Posted 2 years ago #
  2. I copied the stock category.php of Thematic and renamed it category-photography.php, no changes, and it still does it.

    Posted 2 years ago #
  3. Still no luck. It appears that the subsidiary asides are not loading at all with the custom category template. I'll continue to look, and if I find an answer, I'll surely post it here with the hopes it can help someone else.

    Posted 2 years ago #
  4. I think I found it. I had a script in my functions.php that was intended to have Photography's child categories use the same template as the parent. Somehow this is not playing nice with the footer subsidiaries. I really have no idea why??? I'd still love to have some function that would not require me to have 6 identical category-templates for each photography sub category, but for now, I'll guess I'll have to do just that.

    Here's the old function that was causing the problem in functions.php. Any ideas why? ...

    //========START Child categories use parent category template=======
    function load_cat_parent_template()
    {
    global $wp_query;

    if (!$wp_query->is_category)
    return true; // saves a bit of nesting

    // get current category object
    $cat = $wp_query->get_queried_object();

    // trace back the parent hierarchy and locate a template
    while ($cat && !is_wp_error($cat)) {
    $template = STYLESHEETPATH . "/category-{$cat->slug}.php";

    if (file_exists($template)) {
    load_template($template);
    exit;
    }

    $cat = $cat->parent ? get_category($cat->parent) : false;
    }
    }
    add_action('template_redirect', 'load_cat_parent_template');
    //========END Child categories use parent category template=======

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.