Custom No-Sidebar Template

General questions pertaining to how certain issues can be resolved. This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.
Forum rules
This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.

1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"
migf1
Posts: 50
Joined: 11 Nov 2009, 02:59

Custom No-Sidebar Template

Post by migf1 » 16 Nov 2010, 03:25

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/
Attachments
shoutbox.rar
(401 Bytes) Downloaded 121 times

Colin
Posts: 5066
Joined: 27 Oct 2009, 10:46

Re: Custom No-Sidebar Template

Post by Colin » 16 Nov 2010, 04:00

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

migf1
Posts: 50
Joined: 11 Nov 2009, 02:59

Re: Custom No-Sidebar Template

Post by migf1 » 16 Nov 2010, 05:22

Thanks for the reply!

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

migf1
Posts: 50
Joined: 11 Nov 2009, 02:59

Re: Custom No-Sidebar Template

Post by migf1 » 16 Nov 2010, 09:18

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.

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: Custom No-Sidebar Template

Post by sayontan » 16 Nov 2010, 11:00


migf1
Posts: 50
Joined: 11 Nov 2009, 02:59

Re: Custom No-Sidebar Template

Post by migf1 » 16 Nov 2010, 12:33

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?
Attachments
functions.rar
(438 Bytes) Downloaded 120 times
Last edited by migf1 on 16 Nov 2010, 12:52, edited 2 times in total.

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: Custom No-Sidebar Template

Post by sayontan » 16 Nov 2010, 12:43

There is a problem accessing your site. Can you disable any compression that you might have enabled?

migf1
Posts: 50
Joined: 11 Nov 2009, 02:59

Re: Custom No-Sidebar Template

Post by migf1 » 16 Nov 2010, 12:47

Done :)

I was gzipping via HyperCache, btw.

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: Custom No-Sidebar Template

Post by sayontan » 16 Nov 2010, 13:05

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');

migf1
Posts: 50
Joined: 11 Nov 2009, 02:59

Re: Custom No-Sidebar Template

Post by migf1 » 16 Nov 2010, 13:15

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? :(

Locked