[wp-hackers] Trouble With Custom Sidebars

Cailen McQuattie cailen at kmsm.ca
Thu Sep 8 22:02:28 UTC 2011


The purpose is to create a test page with its own independent sidebar
that I can put test javascript in.

I'd like to avoid using if statements that will be loaded on every
page of my site, and this is listed in the codex as supported
behaviour but it isn't acting as expected.

I'd like sidebar-custom.php to be loaded on one page of my site, but
whether I use get_sidebar('custom') or an include statement and don't
call get_sidebar() at all, I can't stop sidebar.php from being loaded.

On Thu, Sep 8, 2011 at 5:54 PM, Muhammad Ali <mjsafoxy at gmail.com> wrote:
> Why don't you just mod sidebar.php ?
>
> On 8 September 2011 22:49, Cailen McQuattie <cailen at kmsm.ca> wrote:
>
>> Howdy hackers,
>>
>> I'm having trouble integrating custom sidebars in different templates.
>> It seems no matter what, the default sidebar is called every time.
>>
>> Ex1: I delete get_sidebar() altogether. The default sidebar.php file
>> is still called and displayed.
>> Ex2: I add a parameter 'custom' -> get_sidebar('custom') on
>> page-{slug}.php. Default sidebar.php is still called, AND
>> sidebar-custom.php is also called.
>>
>> Obviously I just wanted sidebar-custom.php to be displayed. What the heck?
>>
>> Thanks for any insight you can provide!
>>
>> Cailen McQuattie
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Cailen McQuattie
KMSM | SalaciousSound
647-338-2896


More information about the wp-hackers mailing list