-
AuthorPosts
-
May 3, 2022 at 10:34 am #1350280
Hi.. Since I need to have a proper Sidebar for the Portfolio Category Pages I’ve found the solution in this post:
https://kriesi.at/support/topic/enfold-portfolio-categories-sidebar-menu/
I’ve put the file sidebar.php in my child theme and add the following line:
if ( is_taxonomy('portfolio_entries') ) { $custom_sidebar = "Sidebar Portfolio"; }
beneath this line:
$custom_sidebar = apply_filters('avf_custom_sidebar', $custom_sidebar);
I’ve create a Sidebar Portfolio and It works..
The Problem is that now the Sidebar Pages appears on single blog Post Pages and in the Blog Category Pages..
How to fix..? I need to have the Blog Sidebar on single Blog post and Blog Category Pages..Thank You
May 4, 2022 at 6:58 am #1350402Hey newmediologo,
Thank you for the inquiry.
Are you sure that you didn’t change anything else in the sidebar.php file? Please remove the modifications or revert the sidebar.php file back to default, then add this code in the functions.php file.
add_filter("avf_custom_sidebar", function($custom_sidebar) { if ( is_taxonomy('portfolio_entries') ) { $custom_sidebar = "Sidebar Portfolio"; } return $custom_sidebar; }, 10, 1);
Best regards,
IsmaelMay 4, 2022 at 8:36 am #1350423Hi Ismael..
It doesn’t works.. Display the Sidebar Portfolio on Portfolio Category Pages but also on Single Blog post and on Blog Category Pages.. I need that the Sidebar Portfolio will displayed ONLY on Portfolio Categories Pages as Enfold does have an option for that..I’ve deleted the file sidebar.php form the child theme and inserted the code in functions.php in the child theme but the result is the same.. Yoi can review the site
Thank You Very Much..
May 4, 2022 at 8:56 am #1350431Hi,
Thank you for the update.
We may need to access the site in order to check the issue further. Please make sure to update the theme to version 4.9.2.2, then post the WordPress and FTP login details in the private field.
Best regards,
IsmaelMay 4, 2022 at 8:59 am #1350432Hi!
UPDATE: We might have found the issue with the modification. Please update the filter in the functions.php file using this code.
add_filter("avf_custom_sidebar", function($custom_sidebar) { if ( is_tax('portfolio_entries') ) { $custom_sidebar = "Sidebar Portfolio"; } return $custom_sidebar; }, 10, 1);
Best regards,
IsmaelMay 4, 2022 at 9:15 am #1350435Yes Ismael.. It works fine..! Thank You Very Much.. Just one more thing..
Sidebar Portfolio is the same of Sidebar Pages but have a different style.. Sidebar Pages have tiny grey lines that divide the items, Sidebar portfolio have not but have just very light lines over and under the active item..
There’s a way to have the same style or not..?
Thank You Very Much again
May 7, 2022 at 1:57 pm #1350858Hi,
Thank you for your patience, to match your widget_nav_menu for Sidebar Portfolio and Sidebar Pages please try this code in the General Styling ▸ Quick CSS field or in the WordPress ▸ Customize ▸ Additional CSS field:#top .widget_nav_menu #menu-categorie-portfolio li a { padding: 0.8em 3px; color: #4f9e00; } #top .widget_nav_menu #menu-categorie-portfolio li { border-bottom: 1px solid #b3b5b1; } #top .widget_nav_menu #menu-categorie-portfolio li:nth-child(1) { border-top: 1px solid #b3b5b1; } #top .widget_nav_menu #menu-categorie-portfolio:first-child>.current-menu-item, #top .widget_nav_menu #menu-categorie-portfolio:first-child>.current_page_item, #top .widget_nav_menu #menu-categorie-portfolio:first-child>.current-menu-ancestor { padding-left: 0; left: 0; box-shadow: unset; }
After applying the css, please clear your browser cache and check.
Best regards,
MikeMay 7, 2022 at 2:26 pm #1350865[UPDATE]: It works selecting the proper Menu in Widget
Thanks
Hi Ismael..
Inserted in General Styling -> Quick CSS
Works fine in Italian but not in English..
Try to replace in the snippet: menu-categorie portfolio with menu-portfolio-categoriesBut doesn’t works..
Any idea..?
Thank You Very Much
- This reply was modified 2 years, 6 months ago by newmediologo. Reason: Problem seem solved
May 7, 2022 at 3:01 pm #1350868Hi,
Thanks for the feedback, it seems to be working on /en/portfolio-sub/accounting-en/ & /portfolio-sub/accounting/
Please see the screenshots in the Private Content area, please try clearing your browser cache and linking to a page where it is not working so we can check.
Best regards,
MikeMay 7, 2022 at 3:36 pm #1350872Thanks Mike..
Now it works fine both in Italian and English, I’ve replaced in the snippet: menu-categorie portfolio with menu-portfolio-categories and selected the proper menu in the Sidebar Portfolio Widget..
The styling in English works If the selected menu is: “Portfolio Categories” It does not works on the single Portfolio Item page..
- This reply was modified 2 years, 6 months ago by newmediologo.
May 7, 2022 at 3:55 pm #1350875Hi,
Thanks for the feedback, try adding this css:#top .widget_nav_menu #menu-portfolio-categories-2 li a { padding: 0.8em 3px; color: #4f9e00; } #top .widget_nav_menu #menu-portfolio-categories-2 li { border-bottom: 1px solid #b3b5b1; } #top .widget_nav_menu #menu-portfolio-categories-2 li:nth-child(1) { border-top: 1px solid #b3b5b1; } #top .widget_nav_menu #menu-portfolio-categories-2:first-child>.current-menu-item, #top .widget_nav_menu #menu-portfolio-categories-2:first-child>.current_page_item, #top .widget_nav_menu #menu-portfolio-categories-2:first-child>.current-menu-ancestor { padding-left: 0; left: 0; box-shadow: unset; }
After applying the css, please clear your browser cache and check.
Best regards,
MikeMay 7, 2022 at 3:57 pm #1350876Replacing the previous code or add below..?
May 7, 2022 at 4:00 pm #1350877May 7, 2022 at 4:01 pm #1350878Thanks Mike.. It Works..
Thank You Very Much.
May 7, 2022 at 4:02 pm #1350879Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Sidebar Problem’ is closed to new replies.