Hello Site Origin Theme,
We can’t get tired of using Vantage Pro, great theme and the best support ever. We have this new issue:
We developed a site for a cliente, made a child theme and added some custom mods ( https://siteorigin.com/thread/add-jquery-moving-background/ ). We finished changed it to his server and when he updated the theme, everything went wrong and some styles and the JS disappeared.
How it looks before the update: http://sp.servicioswebmex.com/
How it looks now (after the update): http://spacefood.com.mx/
We checked both sites (since we have the installation before the update and after), our customizer settings where reseted but that is an easy fix.
The hard part is this:
To have the moving clouds in the background we added the following files to the folder:
public_html/sp/wp-content/themes/vantage/js
clouds.js > https://www.dropbox.com/s/ob4pua797j7t3wa/clouds.js?dl=0
xfunctions.js > https://www.dropbox.com/s/a5vmaoj1c0b93gs/xfunctions.js?dl=0
and public_html/sp/wp-content/themes/vantage/js/items
> https://www.dropbox.com/s/tls6o5wookmd859/Captura%20de%20pantalla%202015-08-21%20a%20las%2018.23.22.png?dl=0
To get it working on the installation previous to the update we added the following functions to the file public_html/sp/wp-content/themes/vantage
in header.php we added:
in functions.php we added:
And it worked perfectly, so basically we need help with this:
The footer got really messed up. (we configured it using CSS)
And the moving background is not working. (we already did exactly the same things we did to the site before the update: uploading the 2 js files, the clouds image and added the code to the header.php and functions.php on the vantage theme, but it is not working)
We we did not confuse you, english is not our first language.
Please help us we already delivered the website and ran out of resources and ideas :/
Thanks again for everything and we hope to hear from you guys soon!
Cheers from Mexico,
J.
Hi Jose :)
Let’s start with the child theme. I just glanced at the sources in my developer tool and it looks a little wild and crazy in there. I can see two stylesheets loading in the child theme, both have the full parent style.css contents in them. This alone can cause challenges. Please, ZIP the child theme, upload to any public source, use Private Reply below and send me the link. I’ll take a look and try advise from there. Thanks!
This is a private message.
Thanks for the feedback. How to troubleshoot? Many ways, one way as I’m doing now is to take the page source from the working home page and save it and then take the page source from the broken home page and save it and then run a diff using your preferred app. For example: https://sourcegear.com/diffmerge/. This allows you to start digging.
Here is how your broken home page is loading CSS:
Try changing lines 1-6 in your child theme to the following:
That’s all you need for that part.
As we chatted about before, you’ll need to have a look at style.css in the child theme. When you’re finished it must only have the edited rules in it.
Finally, this might be the problem. The Customizer settings aren’t the same between these two sites. That might be part of the issue. Check the two Customizer > Theme Design sections and compare against each other.
Also in this site: Private Snippet there is a moving background image. On this site I’m not sure it’s there: Private Snippet. Have you checked that the same plugin is working on both sites?
Hey Andrew,
we solved the moving background issue. We did not use a plugin to add it we actually used some custom php and added some code to the header.php and the functions.php The problem was we added it to the parent theme and when we did the update it was all gone, so how can we add it to the child them so it will stay the same after the updates:
This is what we added to the header.php
This is what we added to the functions.php
And this is what we added to the functions.php inside wp_head()
Hope you can help!
Thanks,
J
For the body class, please, see:
https://codex.wordpress.org/Function_Reference/body_class#Add_Classes_By_Filters
That can be done from within your child theme.
As far as going further. We don’t, officially, offer any customisation support on this level. I’ve already spent some time checking everything out. Ideally I need your team to continue the hunt for the problem. This isn’t really a matter of asking me a question, I’d have to keep combing the two sites to figure out where the problems are. It’s basically a custom development task :) I hope you understand the challenge of our support policy vs what you’re asking. I’ve already gone over what I’m ideally meant to be working on here on the forums.
So my advice now:
1. Download DiffMerge.
2. Compare the outputs of each page.
3. Figure out where the differences are. The body class did show up as different when I ran the diff so you would have picked up that mistake right there.
Finally, regarding this:
What is this? Do you know why it’s being included?
jQuery is already a dependency of Vantage, you shouldn’t need it:
Is this URL correct? Don’t you mean to list the child theme folder here?
jQuery is already a dependency of the parent theme, do you need this?
I assume you left a part of this function out. You’d still need to add_action.
That’s about as far as I can go on this :)
Everything you’re looking for is in the Codex somewhere. For example, on registering scripts, please see: https://codex.wordpress.org/Function_Reference/wp_enqueue_script
Hope that helps.
Hey Andrew!
Thanks for all the great support with your guidance and some hardwork we got it working back again. The CSS is ok and the moving background with JS also.
But now after all this we are getting this error:
http://spacefood.activemarketing.mx/wp-content/uploads/2015/10/Error_Child_Theme.png
Any idea what could be causing it?
This is how we set up our child theme http://spacefood.activemarketing.mx/wp-content/uploads/2015/10/Carpeta_Child_Vantage.png
This is what we have in the stylesheet css
IWe cant seem to find the error :o
pleaaaase help!
Thansk
J
Hi :)
Please, check the functions.php file in your child theme. If you’re already enqueing the parent style.css file in there then you mustn’t import it in the child theme style.css file.
To confirm, if in functions.php you enqueue the parent CSS, do not use this:
This line is incorrect:
It should just be “vantage”.
Please, see our starter child theme here, everything you need is there: https://siteorigin.com/wp-content/uploads/2015/03/vantage-child-starter.zip