Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1278835
    dmog74
    Participant

    Hi there,

    I’ve added the code to my functions.php in my child theme that you provided in #1105818 to create a sidebar in my portfolio items – great stuff. However, I don’t know how to control the content of the sidebar. For other page types, I can assign which sidebar goes on which page from the APPEARANCE -> SIDEBARS menu. But I don’t see how to assign the sidebar I want to each Portfolio-type page – they are only showing the standard ARCHIVES / CATEGORIES / META content. Can you help please? Thank you for the great support!

    #1278904
    dmog74
    Participant
    This reply has been marked as private.
    #1279109
    Jade
    Moderator

    Hi there,

    Please add this code in the functions.php file in the child theme:

    add_filter( 'ups_sidebar', 'portfolio_sidebar', 9999 );
    
    function portfolio_sidebar ( $default_sidebar ) {
        if ( x_is_portfolio_item() ) return 'ups-sidebar-custom-sidebar'; //Must match the ID of your target sidebar
        return $default_sidebar;
    }

    Please replace ups-sidebar-custom-sidebar with the sidebar ID that you can find in Appearance > Sidebar.

    Hope this helps.

    #1279530
    dmog74
    Participant

    Amazing – this did the trick. Thank you!!

    #1279537
    dmog74
    Participant

    I don’t think this is related, but I’ve tried to set up a portfolio page (that lists all single portfolio items) and I’m getting an error when I try to open it. Please see attached.

    Just as an FYI – I realise I asked for a sidebar on the portfolio item pages, but I don’t want one on the portfolio list page. Is this problematic?

    Can you let me know what my issue is? Thank you so much!

    Dylan

    #1279593
    Rad
    Moderator

    Hi there,

    No, it shouldn’t be affected. Would you mind providing your FTP login credentials as well?

    Thanks!

    #1279642
    dmog74
    Participant
    This reply has been marked as private.
    #1279650
    Christopher
    Moderator

    Hi there,

    Please check provided credentials, they didn’t work.

    Thanks.

    #1279663
    dmog74
    Participant
    This reply has been marked as private.
    #1279669
    Christopher
    Moderator

    Hi there,

    Please provide us with correct WP credentials as we need to check WP dashboard.

    Thanks.

    #1279715
    dmog74
    Participant
    This reply has been marked as private.
    #1279725
    Christopher
    Moderator

    Hi there,

    I resaved portfolio page to fix the issue.

    Hope it helps.

  • <script> jQuery(function($){ $("#no-reply-1278835 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>