ThemeShaper Forums » Thematic

[closed]

Display secondary aside on Home Page ONLY

(6 posts)
  • Started 3 years ago by posword
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. Is there a function I can use to force the secondary aside to display on the Home Page only?

    At the moment it seems to display on other pages randomly like the Blog page and I think its causing the content to be truncated on the right of the Newsletter page, but its not displaying at all on the Home Page (http://www.peterwade.com/)

    Thanks,
    Peter

    Posted 3 years ago #
  2. if you take a look at widget-extensions.php you will find the function thematic_widgets_array() that is responsible for setting up the widget areas. Each widget area is defined a function, so first you need to filter in a new function for the widget area you want to change.

    // Point Secondary Aside to New Function
    function change_widget($content) {
    	$content['Secondary Aside']['function'] = 'child_secondary_aside';
    	return $content;
    }
    add_filter('thematic_widgetized_areas', 'change_widget');

    then you can copy the original function and add your new conditions to it:

    // Re-Define the Secondary Aside
    function child_secondary_aside() {
    	if ( is_active_sidebar('secondary-aside') AND (is_front_page()) ) {
    		echo thematic_before_widget_area('secondary-aside');
    		dynamic_sidebar('secondary-aside');
    		echo thematic_after_widget_area('secondary-aside');
    	}
    }

    BUT- i think your problem is all CSS related. you seem to have monkeyed heavily with the traditional thematic layout. and if you increase the width on #container and #content that secondary div will go back under the primary one.

    Posted 3 years ago #
  3. Thanks, helgatheviking. I've appreciated your posts I've read on this forum. Yes, the last two developers I've hired have monkeyed heavily with the layout, probably not understanding Thematic as well as I thought they did.

    Currently the developer has upgraded from 0.9.6 to 0.9.7.7 and this has caused the problems. This morning I replaced the current style.css with the old one under 0.9.6 and it really screwed up the home page, so I'd say its definitely a CSS problem, but I'm totally lost in CSS positioning.

    Your reply did answer one question I've been pondering over, that is, how to display or not display the secondary aside. It seems from what you said in the last paragraph that it always display and it has to be overwriten with a larger box or frame. Am I on the right path?

    I'm trying to get the site settled so I can hand over to a webmaster and I've only got two issues left. Do you freelance or can you recommend a knowledgeable Thematic developer?

    Cheers,
    Peter

    Posted 3 years ago #
  4. Peter,

    Yes I do thematic freelance. you can email me at helgatheviking AT gmail DOT com

    Posted 3 years ago #
  5. helgatheviking - came across your post here when Google-ing the issue. Thanks for sharing the solution. Works super, just pasted those two blocks of code into my child-theme's function.php and all good. Kudos to you.

    Posted 3 years ago #
  6. you're welcome ben. sometimes i do even verify code before posting. ;) but sometimes i just shoot from the hip too.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.