Correcting an error when setting up Adsense in my website

Status
Not open for further replies.

Gatonga

Newbie
Joined
Jun 15, 2018
Messages
12
Reaction score
1
Hello people,

I recently wanted to add ad sense code to my header file of my WordPress website. But I keep getting this error, "Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix" Who can help me fix it. Thanks

Jeremy
 
Hello people,

I recently wanted to add ad sense code to my header file of my WordPress website. But I keep getting this error, "Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix" Who can help me fix it. Thanks

Jeremy
It's a very generic wp editor error, so... hard to say what's wrong. My guess is that your web user does not have permission to edit other files.

To fix this, you login to your ssh, go to the www folder. Now type (CAUTION: it might break your OS if you are not inside the www folder... You may end up incorrectly chowning system files. Don't blame me if that happens),

sudo chown -Rv www-data:root *

Obviously, this command will be different if
1) you are not using ubuntu
2) your web user is not www-data.

Better hire someone to fix the permissions for you. It's just a 10 minute job.
 
Try adding the code not through an editor, but via widgets Appearance > Widgets
If you have no widget to show ad in the exact location you want to > try a plugin called Ad Inserter
You can also request help on forum
 
Try adding the code not through an editor, but via widgets Appearance > Widgets
Yeah, that would be another solution.. but the placement options will be limited to what theme he is using. He should probably go for this though.
 
Yeah, that would be another solution.. but the placement options will be limited to what theme he is using. He should probably go for this though.

Most themes have now widgets to do right what op is looking to do, so it should be an easy fix
 
Most themes have now widgets to do right what op is looking to do, so it should be an easy fix
Agreed. If it's only the ad placement that isn't working; OP should place the ads via widgets. However, he might also have issues while uploading images from wp gallery; for the exact same reason. For that, he will need to correct the ownership. :)
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top