Sidebar removal on single page not working
-
Is it overall possible to take the sidebar out of a page that is not even published yet but only saved as a draft?
That′s at least what I am trying to do with the webpage and I’ve searched so many forum posts for different php code to exclude sidebar from only this draft page with the specific id of 600 as it is now.
In the Editor I have a php page called sidebar.php where I can find this line:
<ul class="sidebar"> <?php wp_list_pages('include=234,237,239,241,243,309&title_li=<h2>' . __('More info about X') . '</h2>' ); ?> </ul>
It makes no difference though what so ever if I add the page id of the newly created draft page I have and add it in there or leave it out.
I have also tried adding conditional statement to my page like this:
<?php if (is_draft_page()) { } else { get_sidebar(); } ?>
But makes no difference what so ever, I really need to get rid of that sidebar while I am working on this particular page.
- The topic ‘Sidebar removal on single page not working’ is closed to new replies.