💡 WordPress allows you to add our codes to all pages at once, a specific page or even into any one post. We'll be using WordPress 5.7.1 in this guide, so please be mindful that there may be minor differences if your version is different. You can always look up adding custom HTML in your WordPress documentation.
Adding Ads to Every Page
Installing our ads to every page of your WordPress website usually requires editing the theme. There are two ways to do that:
Editing the Source Code
It works best for Social Bar and Popunder codes, however you can add almost any Ad Unit. To access the theme:
Click 'Appearance' and select 'Theme Editor' from the left-hand menu;
Find the theme element you'd like to add the code snippet to under the 'Theme Files' on the right;
Click the element name (for example, Theme Header or Theme Footer) to see its source code;
Where you paste the code snippet depends on the Ad Unit:
To add a Popunder, paste the code snippet right before the closing </head> tag (usually available in the 'Theme Header' file);
Place Social Bar code at the very end of the file;
Banners and Native Banners can be placed anywhere in the page body, but make sure it fits in well.
Click 'Update file' below to save the changes.
Placing the Code Snippet via Widgets
Widgets are more convenient when working with Native Banners and Banners, as they are a bit more visual. 'Custom HTML' is the only widget you'll need to install any Adsterra Ad Unit, however you can also use 'Text' widget if your WordPress version is below 4.8.1 and does not support 'Custom HTML'
Click 'Appearance' and select 'Widgets';
Select on the 'Custom HTML' widget;
Check the theme element and click 'Add Widget'; the widget will open in the element section;
Paste the code snippet into the widget and click 'Save'.
Bear in mind that you may need to double-check if the code snippets you added are still available whenever you switch your WordPress theme.
Placing an Ad on a Single Page
If you want to have an ad on a specific page only, you can add the 'Custom HTML' widget to this page only. This will work for any Ad Unit as well.
Select 'Pages' from the left-hand menu;
Mouse over the page you'd like to modify and select 'Edit';
Click ➕ and select 'Custom HTML'
Insert the code snippet into the text box;
Click 'Update' in the upper right corner.
Having added the code, you can click 'Preview' to check if the ad has been installed correctly.
Adding an Ad to a Post
Native Banners and horizontal Banners would look the best within a post, right after the title or between two paragraphs. We'll use the 'Custom HTML' widget for this as well.
Navigate to 'Posts' from the left-hand menu;
Find your post in the list, hover over its title and select 'Edit';
Click ➕ in the upper left corner and scroll down to Widgets
Paste the script from the Websites page into the widget;
Click 'Update' in the upper right corner.
When adding the ads, make sure your scripts don't conflict: if you have a Social Bar or Popunder in your theme, adding the same ad unit to a specific page or post may prevent both codes from working.
💡 Note that we do not provide ads.txt files, as our advertisers do not require them.
If you still need it, you can contact us to request the required details and create the file on your own. We'll be glad to share the needed data with you!