ThemeShaper Forums » Thematic


removing sidebar from certan pages

(3 posts)
  • Started 10 years ago by lhm
  • Latest reply from lhm
  • This topic is not resolved
  1. Hi everybody,

    From Chris' great code snippets at:

    I graped the following code:

    // filter thematic_sidebar() .. no display for the page 'Forum', keep it for the rest
    function remove_sidebar() {
    // We test if we are on the page 'Forum'
    if (is_page('forum')) {
    // Yes, we are .. now we switch off the sidebar
    return FALSE;
    } else {
    // we are not .. we leave the switch on
    return TRUE;
    // Connect the filter to thematic_sidebar()
    add_filter('thematic_sidebar', 'remove_sidebar');

    The code works with every page except my blog post page and another page that contains a danish character ("æ") in the name.

    I want the sidebar only on the blog post page, so I tried:

    if (is_page('bloggen')) {
    return TRUE;

    ... but with no succces.

    Hint, anyone?


    Posted 10 years ago #
  2. Hi Lasse,

    try to use 'laeserne' instead of 'Læserne'.

    Could you please give me some more details 'bout the page 'Bloggen'? How did you create this page?

    Even the body class for this one isn't very helpful and looks strange.


    Posted 10 years ago #
  3. Thanks Chris,

    The page 'Bloggen' I simply created from the dashboard, (Pages > Add New), then selected that page as the Post Page under 'Reading Settings'. Is that not the correct way to do it?

    Replacing 'æ' with 'ae' works, so one workaround could be to disable the sidebar for ALL pages EXCEPT 'Bloggen' which apparently behaves strange.

    It would be nice, however, to know if I did something wrong and there might be a deeper problem ...


    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.