Ad code no longer in header.php file (after putting it there)

[ad_1]

Can code you place in one file migrate to another one?

No.

I may have updated the theme since I originally placed the code. Can that do weird things in terms of making custom code in header.php disappear?

When a theme is updated, the entire theme folder is replaced — so any edits you made in any of the theme files will be lost completely. Using a child theme solves that problem.

But weirdly the ad code DOES still show up in the site’s source code, and the ads are still displaying.

Weird indeed. Can you provide the site address so I take a peek?

Hi George, thanks for responding. I sent you an email with the details if you want to take a look, thanks

I would recommend that you continue the communication here as described in the forum rules: https://projectdmc.org/support/forum-user-guide/faq/#why-is-asking-for-offering-email-support-not-permitted

I sorted the issue now with my host so all sorted now.

Nice to read. Feel free to write what the problem was and mark the topic as solved.

I still don’t know entirely how it was solved, but it was. Going back and forward between the ad network and the host, someone somewhere managed to find and delete the ad code. I still don’t know how it went missing from the header.php file or who found it and where, so will remain something of a mystery for me for now.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer