Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
702 views
in Plugins by
Hi, I'm trying to add some functionality to my site using plugin like code. For one of the pages, I'd like to show a large table, so I'd really like to not show the sidebar. So far I'm using $a_content = qa_content_prepare()  to generate the pages (using $qa_content["custom"] to add my code. However, I'm not sure how to remove the sidebar (if it's even possible that's it)

Any clue?

Thanks
Q2A version: 1.7

1 Answer

+3 votes
by
selected by
 
Best answer

You can remove the sidebar and sidepanel by unsetting the elements in the content array:

unset($qa_content['sidebar']);
unset($qa_content['sidepanel']);

by
Thank a lot, I tried making $qa_content['widget']='' with no luck. This does exactly what I'm looking for.
by
ahh, I finally got to keep working on this, and while I managed to hide the sidebar/sidepane. It seems I haven't regained the space. Would you know how to resize the main area? (I'm using $qa_content['custom'])
by
oh I think I found it: add some custom css to the header so .qa-main{width:100%;}
by
still, while the sidebar is completely gone, I still have an empty <div class="qa-sidepanel"></div> taking space :/
by
.qa-sidepanel {display:none;} did the trick
...