Tagged: x
-
AuthorPosts
-
December 2, 2016 at 9:13 am #1278835
dmog74ParticipantHi 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!
December 2, 2016 at 10:24 am #1278904
dmog74ParticipantThis reply has been marked as private.December 2, 2016 at 1:38 pm #1279109
JadeModeratorHi 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.
December 2, 2016 at 10:22 pm #1279530
dmog74ParticipantAmazing – this did the trick. Thank you!!
December 2, 2016 at 10:39 pm #1279537
dmog74ParticipantI 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
December 3, 2016 at 12:19 am #1279593
RadModeratorHi there,
No, it shouldn’t be affected. Would you mind providing your FTP login credentials as well?
Thanks!
December 3, 2016 at 1:43 am #1279642
dmog74ParticipantThis reply has been marked as private.December 3, 2016 at 2:03 am #1279650
ChristopherModeratorHi there,
Please check provided credentials, they didn’t work.
Thanks.
December 3, 2016 at 2:14 am #1279663
dmog74ParticipantThis reply has been marked as private.December 3, 2016 at 2:21 am #1279669
ChristopherModeratorHi there,
Please provide us with correct WP credentials as we need to check WP dashboard.
Thanks.
December 3, 2016 at 4:15 am #1279715
dmog74ParticipantThis reply has been marked as private.December 3, 2016 at 4:51 am #1279725
ChristopherModeratorHi there,
I resaved portfolio page to fix the issue.
Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1278835 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
