• Resolved atulameta

    (@atulameta)


    I am unable to add meta tags and google adsense code to head section of header.php. I tried to add it in both travel log and twenty twenty themes. But, It says- “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 and upload the file over https://FTP.”
    I do not have technical knowledge to add it via FTP, anyone please help.
    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Try switching to a different theme, then try saving your edits to your normal theme when it’s inactive. After saving you can switch back again.

    If you still have trouble, there are some server configurations that simply do not allow the theme editor to work. Instead of FTP, you might be able to use your hosting account’s file manager to edit files. It works similar to your computer’s file manager.

    You shouldn’t be editing distributed theme files. When they are updated your changes are lost. To protect your changes, you should create a child theme.

    I realize creating a child theme could be beyond what you feel your abilities are. It may be worth giving it a try to save you from having to re-edit the template after updates. We’re here to help if you run into trouble.

    You might try finding a plugin that allows you to add head section content through a more friendly interface.

    Thread Starter atulameta

    (@atulameta)

    I have added code using a plugin, meta tags inserter. It’s working and it was easy to add codes in this.
    thanks a lot, @bcworkz .

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to add code in header.php’ is closed to new replies.