Tagged: x
-
AuthorPosts
-
October 18, 2016 at 11:29 pm #1221812
WildwoodParticipantHi,
I have followed the instructions to add a sidebar to the portfolio pages as described here:
https://community.theme.co/forums/topic/adding-sidebar-to-single-portfolio-pagepost/
HOWEVER … my client has MANY sidebars and I am unable to select a sidebar for the portfolio pages. (see attachment)
Please let me know how to assign a specific sidebar to portfolio pages.
Thank you!
October 19, 2016 at 2:55 am #1221960
ChristopherModeratorHi there,
Please add following code in child theme’s functions.php file :
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; }Hope it helps.
October 26, 2016 at 11:31 am #1231783
WildwoodParticipantThis reply has been marked as private.October 26, 2016 at 12:29 pm #1231896
ThaiModeratorHi There,
In this case, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link login to your site
– WordPress Admin username / PasswordDon’t forget to select Set as a private reply. This ensures your information is only visible to our staff.
Thanks.
October 29, 2016 at 12:17 pm #1236002
WildwoodParticipantThis reply has been marked as private.October 29, 2016 at 12:19 pm #1236006
WildwoodParticipantThis reply has been marked as private.October 29, 2016 at 8:47 pm #1236304
Rue NelModeratorHello There,
You can use Christopher’s solution by using this code in your child theme’s functions.php file
add_filter( 'ups_sidebar', 'portfolio_sidebar', 9999 ); function portfolio_sidebar ( $default_sidebar ) { if ( x_is_portfolio_item() ) return 'ups-sidebar-all-products-batteries'; //Must match the ID of your target sidebar return $default_sidebar; }Hope this helps. Please let us know how it goes.
October 31, 2016 at 10:35 am #1238014
WildwoodParticipantHi,
Sorry, Christopher’s solution did not help.
I am still unable to assign a specific sidebar to a specific portfolio page.
Please advise.
Thank you.
October 31, 2016 at 11:36 am #1238090
ThaiModeratorHi There,
I checked your single portfolio item page, I could see that the side is displaying correctly:
http://i.imgur.com/lFBkshK.png
http://i.imgur.com/Df6BuTG.png
Could you please double check on it?
Thanks.
October 31, 2016 at 12:07 pm #1238133
WildwoodParticipantYes, this is the default sidebar.
The request above is to apply individual sidebar to various portfolio pages.
I am unable to ASSIGN the sidebar to a portfolio page as I am able to do with all other pages/posts.
Thank you.
November 1, 2016 at 1:10 am #1238764
ChristopherModeratorHi there,
Adding php code in child theme’s functions.php file won’t list portfolio items under posts and pages box. It let you to choose one sidebar like
ups-sidebar-all-products-batteriesand display it on all portfolio pages.Hope it helps.
November 1, 2016 at 9:35 am #1239207
WildwoodParticipantHi Christopher,
No, this doesn’t help. I am sorry that I was not clear.
How can a specific sidebar be assigned to the portfolio pages in the same way sidebars can be assigned to posts and pages.
Is there anyway to include the portfolio pages to the SIDEBAR selection?
Thank you very much.
November 1, 2016 at 8:47 pm #1240133
LelyModeratorHello There,
That is how wordpress works by default. Portfolio item is a custom post type and it is not included on the list that you need to tick for custom sidebar to be available. It can be achieve by customization, unfortunately, it is outside the scope of our support. Thank you for understanding.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1221812 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
