This topic has 14 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #145500
     Roader
    Participant

    Content Aware Sidebars does not work.

    Please look at the video.

    –––––

    Maybe a solution: How I can add a New Sidebar inside ?

    By default SweetDate has:  Main Sidebar, Footer 1, 2, 3 and 4, Shop Sidebar, etc.

    But, If you can tell me how,  I could add a New Sidebar for:  Profile, etc. Only I need the code the replicate Main Sidebar but only for Profile, etc. I did try, but does not work.

     

    function sweetdate_widgets_init() {

    register_sidebar( array(

    ‘name’ => __( ‘Main Sidebar’, ‘kleo_framework’ ),

    ‘id’ => ‘sidebar-1’,

    ‘description’ => __( ‘Default sidebar’, ‘kleo_framework’ ),

    ‘before_widget’ => ‘<div id=”%1$s” class=”widgets clearfix %2$s”>’,

    ‘after_widget’ => ‘</div>’,

    ‘before_title’ => ‘<h5>’,

    ‘after_title’ => ‘</h5>’,

     

    ) );

    Attachments:
    You must be logged in to view attached files.
    #145502
     Roader
    Participant

    Example:

    function.php ==> Okey, with this code Profile Widget appears.

    COPY CODE
    register_sidebar(array(
    		'name' => 'Profile Widget',
            'id' => 'profile-1',
    		'before_widget' => '<div id="%1$s" class="widgets clearfix %2$s">',
    		'after_widget' => '</div>',
    		'before_title' => '<h5>',
    		'after_title' => '</h5>',
    	));

    But, when I put this in Members / Single / Activity-wall.php or Whatever, Not widget appears.

    COPY CODE
    <?php
    if (is_active_sidebar( 'profile-1' )) {
        dynamic_sidebar( 'profile-1' );
    }?>
    #145616
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

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

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #145814
     Radu
    Moderator

    Hi,
    Replace the code from functions.php with this

    COPY CODE
    
    function register_sidebar_activity()
    {
        register_sidebar(array(
            'name' => 'Profile Widget',
            'id' => 'profile-1',
            'before_widget' => '<div id="%1$s" class="widgets clearfix %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h5>',
            'after_title' => '</h5>',
        ));
        
    }
    
    add_action('bp_loaded', 'register_sidebar_activity');
    

    It works I’ve tested.

    You can do the same for all your sidebar needs for every bp template, you can add to sa same function a new register_sidebar array.

    Cheers
    R.

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

    Hi Radu. This code:
    function register_sidebar_activity()
    {
    register_sidebar(array(

    Does not work. Profile Widget does not appears in Widgets.

    I did put your code in functions.php

    And, after that, what is the other code for obtain this widget or sidebar only for Profile (activity, friends, etc…)?

    #146072
     Radu
    Moderator

    An from example another kind of widget appears ? other than profile widget ?

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

    Hi Radu. With your code function register_sidebar_activity()
    Not appear any widget.

    I need a widget only for Profile.

    Or the code for obtain a functional widget for whatever area (friends, messages, etc.) that I need (in profile).

    If you have, please, send me that.

    #146231
     Radu
    Moderator

    Hi,

    The code works on my localhost install I’ve tested.

    I don’t have such as codes already made…

    Cheers
    R.

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

    Hi Radu. This code:
    function register_sidebar_activity()
    {
    register_sidebar(array( ………….

    Test on localhost:
    Does not work. Profile Widget does not appears in Widgets.

    Solution: Create a Global* Sidebar for Profile (*friends, messages, notify…),
    of the same way that you created a Main Sidebar, Footer 1, 2, 3, 4…

    Other problem, but with Creating Sidebars from Appearance…

    In Blog Page you can see KLEO Recent Posts and Groups Widget, okey!
    But, when you click on the Post Link for see a single post, there are Not Widgets.
    Why? Because this Sidebars only works for specific Pages, not for Singles: Posts, Entries, Categories, etc.

    SO PLEASE! If I create a new Sidebars, f. exp. “Activity”, this new Sidebar needs to be Global for Activity including Single.

    Fix it!

    Attachments:
    You must be logged in to view attached files.
    #146349
     Radu
    Moderator

    Hi,

    I saw in this case it means that for that custom code needs some additional time to investigate and testing, for the moment personally i don’t have time to do this for you (it’s custom, support doens’t cover this kind of thigs) please use this method instead :

    https://premium.wpmudev.org/blog/how-to-create-multiple-sidebars-for-buddypress-no-template-edits-required/

    Cheers
    R.

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

    Hi Radu!

    Buddypress Sidebar is Very OutDate! :-/

    #146443
     Radu
    Moderator

    Give a try

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

    Does not work, because this plugin is Old and Outdate!

    So, please, send me the code for duplicate Main Sidebar, but only for Profile…

    #146465
     Roader
    Participant

    And what is the solution for: Custom Sidebar f. ex. Blog / Single Post
    You know, Custom Sidebar in Single Post, does not appear.

    #146575
     Radu
    Moderator

    Hi again,

    Remove all codes recording the sidebars from this topic and use those

    COPY CODE
    
    function register_sidebar_activity()
    {
        register_sidebar(array(
            'name' => 'Profile Widget',
            'id' => 'profilewidget',
            'before_widget' => '<div id="%1$s" class="widgets clearfix %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h5>',
            'after_title' => '</h5>',
        ));
    
    }
    
    add_action('wp_loaded', 'register_sidebar_activity');
    

    Then you will have to upload this file sidebar.php into child theme

    Explanations :

    This should be enough to understand how it works, i think we can close this ticket because solution it’s provided

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?