Skip to:
Content
Pages
Categories
Search
Top
Bottom

Removing a sidebar from a topic page

  • @acer55

    Participant

    I know many fellows talked about how to remove a sidebar from a topic page, but they all are too complicated for me. So, I’m wondering whether I can remove a sidebar from a topic page by editing “funtions.php”.
    For example, the url of a topic page includes string “topic”, so the following code (not completed yet) will work?

    
    function bbPress_sidebar_hide() {
    	$url = $_SERVER['REQUEST_URI'];
    	if(strpos($url,'topic') !== false){
                
            // here is the code for removing or hiding a sidebar which I don't know 
      
    	}
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • @robin-w

    Moderator

    the code would need to go in a theme page, as it is your theme that renders the sidebar.

    Sorry beyond free help

    @acer55

    Participant

    Thanks anyway.

    @robin-w

    Moderator

    🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar