• Resolved Rob49

    (@rob49)


    Hi,

    Taking my first steps with WP and having great fun with it.

    I’m kinda stuck on one issue regarding the use of conditional comments to remove the sidebar.

    I have a 4 page site: Home – Portfolio – About – Blog

    I’d like to just have the sidebar showing on the Blog page. I did a search and found this advice:

    link

    but I’m stuck on how to implement it into my sidebar.php file.

    Please let me know if any more info is needed.

    Appreciate your help.

    Rob

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Rob49

    (@rob49)

    Not sure if it would help, but here is my sidebar.php file in full:

    [code moderated according to Forum Rules - please use the pastebin]

    if your theme has the template file page.php, and you don’t want a sidebar on any static page, it might be the easiest to remove the get_sidebar(); code from page.php.

    the next challenge is then to stretch the content over the available space; by editing style.css.

    details depend on the theme you are using.

    link to your site?

    Thread Starter Rob49

    (@rob49)

    Hi alchymyth,

    Afraid I’m only working on it locally at the moment, but here is a link to the theme I am using: Live demo of theme

    Thanks

    @ Mods: Sorry about the code overload.

    i have trouble downloading the theme ??

    does it have a page.php template?

    if so, have you tried my suggestion?

    (keep a clean copy of the theme as a backup in case you need to reverse some changes)

    Thread Starter Rob49

    (@rob49)

    Hi alchymyth,

    Sorry for the delay, yes just removed get_sidebar(); from page.php and it works ??

    As you say, there is now a slight problem with the sidebar looking a little out of synch, but that should be easily fixed in the CSS.

    I will have a crack at that now. ??

    Thread Starter Rob49

    (@rob49)

    All sorted ??

    Thanks for your help alchymyth and an interesting site you have.

    Cheers

    thanks ??

    – if all is working, please mark this topic as ‘resolved’

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Removing Sidebar on pages-conditional comments’ is closed to new replies.