Page 1 of 2

Custom No-Sidebar Template

Posted: 16 Nov 2010, 03:25
by migf1
Hello,

I'm trying to make a custom (no sidebars) template for displaying Pierres Wordspew, as explained in the above link. So I just copied no-sidebars.php file to shoutbox.php and replaced...

Code: Select all

<div class="entry fix">
<?php suffusion_content(); ?>
</div><!--/entry -->
with...

Code: Select all

<div class="entry fix">
<?php jal_get_shoutbox(); ?>
</div><!--/entry -->
But it keeps showing in the right sidebar some widgets which are defined to be shown everywhere (with the widget logic plugin). If I set the original "No Sidebars" template for that page, then the widgets are not shown. So I guess there must be something else I should correct inside my custom Shoutbox.php template file (which I attach below btw, for reference).

I can reach the visual layout I want, by using one of the default templates of the theme, then putting the shoutbox as a widget below the header or before the footer, and setting it with the widget-logic plugin to be shown only on that page. Which I have already tried btw, using #post-15606 {display:none} in my custom css file to hide the page body.

But I think that would slow down even more my already overloaded site. I think that just using a template for that page without setting widgets and conditional tags would be much more efficient.

I would appreciate some help here Sayontan!

The page under question is this one: http://gvrteam.gr/portal/community/shoutbox/

Re: Custom No-Sidebar Template

Posted: 16 Nov 2010, 04:00
by Colin
What you want to do can be easily achieved with a child theme. This would be the best way to do this so that when Suffusion is updated you won't lose your custom template.

Have a look at this thread

http://www.aquoid.com/forum/viewtopic.p ... lin#p13574

Re: Custom No-Sidebar Template

Posted: 16 Nov 2010, 05:22
by migf1
Thanks for the reply!

It's time for me to learn using Child Themes :)

Re: Custom No-Sidebar Template

Posted: 16 Nov 2010, 09:18
by migf1
Ok I just read the stock documentation for child themes, but I fail to see how this will help me with the problem I described in my first post.

It was a good read but the essence of my original question stays unanswered I think. What I really need to know is why those widgets keep showing up in the right part of the screen when my custom no-sidebars template is active.

Thanks in advance.

Re: Custom No-Sidebar Template

Posted: 16 Nov 2010, 11:00
by sayontan

Re: Custom No-Sidebar Template

Posted: 16 Nov 2010, 12:33
by migf1
That was an excellent read Sayontan, thank you!

However, it still doesn't work for me :(
What is fixed however with your suggestion is that, now there is a visible sidebar containing the widgets (the widgets were thrown outside the container of the page, before). See for yourself: http://gvrteam.gr/portal/community/shoutbox/

I'm attaching below my suffusion-child/functions.php (my suffusion-child/shoutbox.php template is the same as the one I've attached in my previous post above).

You can see that I have set $template_sidebars['shoutbox.php'] = 0; but the sidebar insists on coming up (plus it shows the widgets).

Could it be that 0 is not accepted as a valid value and it defaults to 1?
0 is what we need in this case though, so that neither the sidebar nor its widgets show up.

Any ideas?

Re: Custom No-Sidebar Template

Posted: 16 Nov 2010, 12:43
by sayontan
There is a problem accessing your site. Can you disable any compression that you might have enabled?

Re: Custom No-Sidebar Template

Posted: 16 Nov 2010, 12:47
by migf1
Done :)

I was gzipping via HyperCache, btw.

Re: Custom No-Sidebar Template

Posted: 16 Nov 2010, 13:05
by sayontan
One error I spotted is in your code:

Code: Select all

add_filter('suffusion_filter_template_prefixes', 'shoutbox');
It should be:

Code: Select all

add_filter('suffusion_filter_template_prefixes', 'my_custom_template_prefixes');

Re: Custom No-Sidebar Template

Posted: 16 Nov 2010, 13:15
by migf1
sayontan wrote:One error I spotted is in your code:

Code: Select all

add_filter('suffusion_filter_template_prefixes', 'shoutbox');
It should be:

Code: Select all

add_filter('suffusion_filter_template_prefixes', 'my_custom_template_prefixes');
Fixed it, thanks!

Still the same though! What am I doing wrong? :(