This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here was that the user had some custom javascript that he wanted to add to his Archive pages.
Solution:
To add custom javascript to your Custom Archive or Views all you need to do is to edit that view and then go to the JS editor on that view and just add the Javascript there.
This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
I am trying to: add menu effect by js inserted in header of theme (Divi child theme). It works great all over the site (including the Woocommerce check out pages) but not at the shop pages where Toolset Woocommerce views + Views are handle the page template. Can you please help. It's all good at the home page or any other page on scroll except Shop page (or any product category page archive).
Link to a page where the issue can be seen: hidden link
I expected to see: same effect on pages handled by Toolset Views (or Toolset Woocommerce views)
Also there is css for it (lines 8-41) but they just add effects, so I won't mention it here.
Right now it been inserted in:
Divi header - screen1 - NO LUCK, works everywhere except Shop
Toolset Layouts - #48620 WC-Shop-Layout (which leads to Toolset WordPress Archive WC-Shop #48621) - still NO LUCK
Also added to child-theme functions.php via enque - NO LUCK Screen2
Well it should react exactly the same as in Home page (on scroll move to top of page and change to alt logo to left). That is what code provides on all other pages.
Dear Shane, please find a short update of my findings
For some reasons , ALL woocommerce pages been created via Views (Woocommerce views) didn't have "et-animated-content" class ( please see screen 1) when I began to scroll page, and that stops CSS/JS from change logo/menu position.
That is why page css structure is different on Home page (left) and Shop page (right) - after scroll and I can't get "et-fixed-header" class in Shop / Product pages.
<CSS>
/*****top-menu fixes*****/
.logo_container {margin-top: 0.5em;margin-bottom: 1em;}
/*hide top menu on scroll no blink*/
.et_fixed_nav #top-header { position: absolute !important; } .et-fixed-header {top: 0px!important;}
/*switch logo on scroll*/
/*********************************
change logo for fixed header - quick and easy way and fix for WC pages
**********************************/
.et-fixed-header #logo {
content: url(hidden link);
}
@media all and (min-width: 980px){
/*********************************
change centered logo on centered header style to default layout when fixed header is active
*********************************/
so imho all Woocommerce pages do nothing with menu because "et-animated-content" class is missing ( "et-animated-content" class creates "et-fixed-header" on other pages)
This scroll functionality is it a part of the theme ?
I'm trying to find the js that adds the class on scroll.
If its a functionality of the theme then the divi team should be able to let us know where the javascript is and then we can just add that code to our JS editor.