Tagged: Burger Menu, enfold
-
AuthorPosts
-
March 30, 2022 at 8:38 pm #1346653
When you go into mobile view of my site the burger menu works fine. However, when you click on any page that links to the subdomain we have connected the menu item stops working. I do not control the subdomain, it works off a master theme file that I give the designer of the subdomain and they say it is not anything on their end. I included my website and the subdomain website as well.
March 31, 2022 at 6:54 am #1346696Hey jblacksten,
Thank you for the inquiry.
The menu items properly redirect to the subdomain when we clicked any of them, but we are not able to see the subdomain because it is restricted to US visitors. Can you provide a short clip of the issue?
Best regards,
IsmaelApril 6, 2022 at 6:08 pm #1347457I have included a video of what it is doing on mobile. The menu works however when transferred over to the subdomain the menu becomes unclickable.
April 8, 2022 at 3:42 am #1347630Hi,
Thanks for the link to your site, I don’t understand how the domain yours but the sub-domain is not?
Nonetheless it looks like the sub-domain has commented out quite a few Enfold scripts, most importantly jquery.js & jquery-migrate.js & menu.js which the menu will need to work.
You are also getting theorigin has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
error, which is why the icons under the map are not showing
Please ask your developer to set Access-Control-Allow-Origin to allow for the sub-domain.Best regards,
MikeApril 8, 2022 at 5:02 pm #1347732Thanks so much for the comment about the Access Control. That issue had been driving me crazy but I was able to get that fixed.
The subdomain I do not control unfortunately, how it currently works is they ask for me to create a master template that they load into their side in order to serve their data using our template. Is there something I should include in my master template that I provide to them? Do I just give them the enfold theme and ask them to load it in? How do I get the scripts from commenting out on their end?
April 8, 2022 at 5:31 pm #1347733I actually just realized why it would not be delivering the menu, since it is a master file I feed off for that subdomain. I hardcoded the menu items and did that years ago before I made the change for the burger menu. So my next question would be is there a way to write a new master file that dynamically changes the header and footer as I update it on my main domain so I do not have to continue to change the master file of the subdomain.
April 9, 2022 at 3:33 pm #1347784Hi,
Glad to hear that you have this sorted out, if the master file you have given them is a PHP file then you should have the header.php & footer.php called in it which should be pointing to your site.
Take a look at the index.php file in the theme and note the get_header(); and get_footer();
you can specify the url for the header.php like:$url = "https://your-site.com"; get_header($url);
If your master file is html then you can add the PHP call like this:
<?php get_header(); ?>
but this will only work if the data provider will allow PHP on the sub-domain, you will need to ask your developer to help you with this.
Your best option would be if you could call the data on your domain and not use their sub-domain, but I imagine you already thought of that.Best regards,
Mike -
AuthorPosts
- The topic ‘Burger Menu not loading on subdomain’ is closed to new replies.