This topic has 11 replies, 2 voices, and was last updated 8 years by Radu.

  • Author
  • #91934
     sashaD
    Participant

    Hello, i have three different custom post types and three different archives for these. I already have several different sidebars which are basically relevant menus. So i want my ‘archive1’ be allocated ‘sidebar1’, and ‘archive2’ be allocated ‘sidebar2’, i.e. show a different sidebar to a different archive.

    Could you please point me in the right direction, perhaps where and how to edit something. Currently all custom archiv phps are just copies of default kleo archive php.

    Thank you in advance.

    regards

    Sasha

     

    #91948
     Radu
    Moderator

    Hi,

    I think this will help : https://archived.seventhqueen.com/forums/topic/create-custom-sidebar

    Let me know

    Cheers

    Radu

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

    Hi Radu,
    thank you for a quick response, I have tried this and it works but i have the same issue as the original guy asked. which is:
    1. is it possible to get rid of the original sidebar? because it still shows, (even when in theme options i chose 1 column right- i see two sidebars, if i select 2 columns right- i see three sidebars, if i select full width, it doesn’t work at all – a whole bunch of white space shown below the items in archive)
    2. is it possible to ensure the bar appears on the left correctly.

    i attached img just in case to clarify my situation

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

    Hi,

    Can you please try to revert changes and then to try to use this plugin ? https://wordpress.org/plugins/content-aware-sidebars/

    Cheers

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

    Hi Radu,
    I tried this plugin yesterday, and did not like it. Considering that whole website is done and all sidebars already allocated, i dont want to add a whole other plugin and recreate same sidebars again just for the three archives. I would rather edit the custom archive templates, i just thought there is a simple known edit for current kleo archive of posts, as there have been many people asking how to set custom sidebar to archive.

    Previous code snippet worked, just not 100%, i would rather try to edit that or the whole archive, are there any other known solutions to this?

    Best regards,
    Sasha

    #92375
     Radu
    Moderator

    Hi,

    Can you please provide admin credentials and FTP to take a look ?

    cheers

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

    Hi, I have been working on local version, i will upload live to test domain, and then provide you with details, by the end of today.

    many thanks
    Sasha

    #92428
     Radu
    Moderator

    Ok,

    Just reply to this ticket.

    Have a nice week

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #92522
     sashaD
    Participant
    This reply has been set as private.
    #92634
     Radu
    Moderator

    Hi,

    I’ve used this code instead

    COPY CODE
    
    function add_before_my_siderbar() { ?>
       
    <?php
    if (is_archive()) { ?>
    <div class="sidebar sidebar-main col-sm-3 sidebar-3rr">
    	<div class="inner-content widgets-container">
     
    		<?php dynamic_sidebar('for home'); ?>
     
    	</div><!--end inner-content-->
    </div><!--end sidebar-->
    <?php } ?>
     
     
    <?php
    }
    add_action( 'get_sidebar', 'add_before_my_siderbar' );
    

    The problem was this class "sidebar-3rr"

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #92669
     sashaD
    Participant
    This reply has been set as private.
    #92692
     Radu
    Moderator

    Hi again,

    It takes to much time for me to assist you to do this custom work, i suggest you to hire a developer that will helps you with your query.

    Please try to use this plugin, it should be ok with what you need https://wordpress.org/plugins/easy-custom-sidebars/

    Cheers

    Radu

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

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?