• I’m working on a website using the Twentyeleven theme – and then creating my custom themes. I created a new static page as my home page and got it looking how I want it with 2 widgets on the sidebar.

    Now here is the problem. On one page I don’t want any sidebar. I don’t want any widgets. All I want is to display some posts full page. One some other subpages I want the sidebar but I want different widgets to display.

    Is there a way to accomplish this or do you have to have the same widgets on every page in the same layout? I tried creating a custom template where I completely remove the <?php get_sidebar(); ?> but the sidebar and widgets still display on the page that I set that template to. I also tried using widget logic and put in !is_page(‘news’). But the widgets still display on the news page.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Do not edit the Twenty Eleven theme. It is the default WordPress 3.2 theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. Create a child theme for your changes. Once your child theme is active, we should be able to help with the customisation.

    Thread Starter woodson02

    (@woodson02)

    I’m sorry I didn’t explain that good enough when I said a created my custom theme what I meant to say is a created my child theme. So yes, the twentyeleven theme is still completely in tack and any changes that have been made where made to the child theme.

    I created one custom template for the home page that also adds a widgetized area above the content which worked perfect.

    I then tried to create a second custom theme where I deleted the <?php get_sidebar();?> but somehow the widgets are still being called.

    I then tried to create a second custom theme

    Custom theme or custom page template?

    Thread Starter woodson02

    (@woodson02)

    Custom Page Template – Sorry I’m not very good with the terminology yet. This is my first wordpress site. I’m used to html/css

    Are you sure you applied the correct template to the Page? Where is this sidebar being called (Twenty Eleven doesn’t have any sidebars in it page/php template),

    Thread Starter woodson02

    (@woodson02)

    My brain is completely fried and my head is spinning. I wanted to make a static page so it said you had to create a new page to display your most recent posts. So that is what I did (it’s been a few weeks and I don’t even remember the steps I did.) So the “news” page was the most recent posts that is typically your default page of the twentyeleven theme. I tried every custom page template including 2 custom page templates to try and get that to just display the most recent posts and remove the sidebar. Couldn’t get it to work. Went back and deleted the custom page template. Went back and applied the default page template. Now the sidebar is gone. Only problem is it is displaying the the content from the “home” page now instead of the most recent posts.

    And who knows if my custom page template was actually working or not because I’m such an idiot I was saving the changes but not publishing it. So I was viewing the page the same way as before even though changes were made. Now I have to try and figure out how to get the most recent posts back to the page lol. Thanks for all your help.

    If you want to display your most recent posts on your front page, why are you using a static front page?

    Thread Starter woodson02

    (@woodson02)

    I wanted the static page to be the home page. So I read this article:
    https://codex.www.ads-software.com/Creating_a_Static_Front_Page. It says you must also create a page to display most recent posts. So that was going to be my news page.

    So what Pages have you selected in Settings -> Reading?

    Thread Starter woodson02

    (@woodson02)

    Ok. So Home is set to static page – which displays correctly. I set pages back to news. View it set as default template. Widgets show again. If its not selected as pages. It doesn’t show the widgets. Confusing stuff.

    What Pages (titles) have you selected in Settings -> Reading?

    Thread Starter woodson02

    (@woodson02)

    news.

    Let me start from the beginning. Installed twentyeleven. Created Child Theme. Took the sidebar-page.php file and saved it into my child theme. Retitled Template Name to Home page – added a widgetized area above the Primary div. Set my home page to the Home page template. Added 2 text widgets to the sidebar. In Settings/Reading set the Home page to static.

    Created new page. Used default page template and called it news. Set Settings/Reading pages (news). Preview the page it has the 2 text widgets appearing underneath the posts.

    I have then set Settings/Reading Pages to blank. Preview News page and I can add content to the main section. Widgets are gone. But it doesn’t display the posts.

    I’m not sure if that is making any sense at all.

    Took the sidebar-page.php file and saved it into my child theme.

    What filename did you use for this custom template?

    I have then set Settings/Reading Pages to blank.

    Set it back to the News page.

    Thread Starter woodson02

    (@woodson02)

    The file name is custom.php.
    * Template Name: Home

    When I set the Settings/Reading to news (which it is currently set at) the widgets are being displayed – using the default page template that doesn’t display the sidebar.

    So custom.php is the name of your home page template, yes? Try changing its filename to front-page.php

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Controlling Widgets and Sidebars’ is closed to new replies.