This topic has 4 replies, 2 voices, and was last updated 11 years by SQadmin.

  • Author
  • #6463
     Tenshi
    Participant

    Greetings! I am currently facing two issues about sidebars:

    #1: I am making a new page but the sidebar I created doesn’t show up.

    What I did:
    – Made a Sidebar called “Guides”
    – Added widgets to “Guides” sidebar (http://puu.sh/5fIRh.png)
    – Created a page with Template as “Default Template”. I also tried “Right/Left Sidebar Page Template” (http://puu.sh/5fISp.png)
    – Set the page to Sidebar “Guides” (http://puu.sh/5fIT3.png)

    But it still doesn’t show up: http://puu.sh/5fITS.png

    #2: The group listing shows a sidebar (Main sidebar) at the bottom of the page, how do you remove this? I already have this function but it still shows:
    add_action('after_setup_theme', 'kleo_disable_group_sidebar');
    function kleo_disable_group_sidebar()
    {
    if(BP_GROUPS_SLUG == bp_current_component())
    {
    remove_action('kleo_buddypress_before_content', 'kleo_buddypress_sidebar');
    remove_action('kleo_buddypress_after_content', 'kleo_buddypress_sidebar');
    }
    }

    I also checked the groups/index.php page and it doesn’t have the sidebar syntax.

    #6517
     SQadmin
    Keymaster

    Hi,
    1. We did the same thing and works.
    – Try to disable some plugins.
    – Try to set WP_DEBUG to TRUE in wp-config.php
    – Try to remove any extra custom code you added

    2. In our site the sidebar in to the right.. not below. probably you did something that messed with it

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #6539
     Tenshi
    Participant

    1. I tried it on my test website and it seems like there is something conflicting with the sidebars. I disabled plugins so they are out of the question. It could be custom functions/codes. I’ll try to find the issue. Thanks! My only problem now is #2.

    2. I keep seeing this in the debug log:

    PHP Notice: Use of undefined constant BP_GROUPS_SLUG - assumed 'BP_GROUPS_SLUG' in /home/dnpugcom/public_html/wp-content/themes/sweetdate-child/functions.php on line 122

    The code is what I posted above. Could that be the issue why it won’t hide the sidebar in the groups directory/listing?

    The full log is here: https://dl.dropboxusercontent.com/u/5867241/debug.log

    #6547
     Tenshi
    Participant

    I think I found the issue for #1. Under Settings > Reading, my posts page was set to the page in question (which is named Guides).

    http://puu.sh/5gErk.png

    Any page set there seems to have their sidebars removed regardless of the page template and sidebars set to that page.

    Could you replicate this issue?

    #6603
     SQadmin
    Keymaster

    Hi,
    For #1 see this topic: https://archived.seventhqueen.com/forums/topic/blog-sidebar-problem

    2. This is the right code to add if you want to remove the sidebar:

    COPY CODE
    
    add_action('wp_head', 'kleo_disable_group_sidebar', 11);
    function kleo_disable_group_sidebar()
    {
    	if(BP_GROUPS_SLUG == bp_current_component())
    	{
    	remove_action('kleo_buddypress_before_content', 'kleo_buddypress_sidebar');
    	remove_action('kleo_buddypress_after_content', 'kleo_buddypress_sidebar');
    	add_filter('kleo_content_class', create_function(null, 'return "twelve";'));
    	}
    }
    

    Also you have to replace the contents of this file: wp-content/themes/sweetdate/page-parts/buddypress-before-wrap.php with http://d.pr/n/InGg

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?