Other CMS Installations
These days, it’s highly unlikely that you’ll be installing our ad code on a site comprised of nothing more than flat files. If you’re running with a CMS, then the information throughout this page will help you integrate the BuySellAds ad code directly into your CMS of choice. Below is a series of quick tutorials aimed at the most used CMSes across the network of BuySellAds publishers.
If you are using Weebly for your website, they offer an easy drag and drop method of adding code to your template.
Please review their tutorial about adding custom code for more details and screenshots. You will
just click on their “Embed Code” icon and then drag that where you want to paste the code.
- For our STEP 1 code, you will just drag the “Embed Code” icon just below the tag of your template. Then you will paste our STEP 1 code there.
- For our STEP 2 code, you will drag the “Embed Code” icon wherever you want that specific zone to appear in your template, and then paste the STEP 2 code there.
Squarespace offers a couple of ways to insert code into your template by default, although both of these methods do not allow for our STEP 1 code to be installed in the correct location.
Code Blocks are inserted into predefined locations in a template, and Code Injections only allow code in the header, footer, lock page or order confirmation page.
Our STEP 1 code needs to be installed just after the opening tag of a website, and there is currently not a way to insert code just after this tag with their default setup via Code Injections or Code Blocks. It is important to install this in the correct location to avoid issues with ad display and impression estimates.
You may still be able to install our ad code if you hire a Squarespace specialist to edit the template’s code using their Developer section.
Squarespace recommends these specialists for code edits such as this to ensure that things are edited properly. If you decide to hire a professional for this, please be sure to provide them with our code installation tutorial as well. 🙂
If you would like to install your ad code using our WordPress Plugin, please follow the instructions below. As always, you can contact our Support Department if you have any questions. 🙂
Important: If you initially used a manual installation and you are now using the plugin, please remove all previous BSA ad code, including the STEP 1 code under. If your STEP 1 code appears twice in a page on your live site (when viewing the source code in your browser), this will cause ad serving issues. STEP 1 code should only appear once in a page.
- First you will need to download the plug-in here and upload to your theme’s ‘wp-content/plugins‘ directory. You can also install directly from your dashboard by clicking on “Add New” under “Plugins” and searching for ‘BuySellAds‘ in the search box.
- After the plug-in is installed, you will need to activate it.
- Next you will need to locate the Site Key in your BuySellAds account. To do this, you will log in to your BSA account dashboard and then click on “Actions > Ad Code” for one of your zones.
- On the Ad Code page, you will see a string of numbers and letters just after the “bsap_” part of the “Step 2” code. This is your site key.
- Copy the Site Key, and then go back to your WordPress account. Click on “BuySellAds” in your WordPress sidebar.
- In the “Site Key” field on that page, paste your site key.
- Then click on the “Save Settings” button.
- Display your ad zones via the widgets menu found in “Appearance > Widgets“.
That’s it! Please be sure to contact our Support Department if you have any questions. 🙂
Here are the instructions to manually install your ad code into WordPress (if you are not using the plugin):
- In WordPress templates within your theme’s files, there is usually a file called header.php that usually includes the opening tag – although this depends on the theme, so not all are setup this way. You just need to find your site’s opening tag. Then you place the STEP 1 code directly after that opening tag with nothing in between. This STEP 1 code should only appear once in each page that you have ad zones on. If you paste this STEP 1 code twice or more on a page, it may not display your ads.
- Your STEP 2 ad zone code will go into a file that may be called header.php, footer.php, sidebar.php or similar – depending on where you want that specific zone to appear. You will repeat this step for each zone that you have – placing the code where you want each ad zone to appear.
There is a step in the plug-in installation in which you need to add a line of PHP code just beneath the opening body tag. The code below is what you will need to add just beneath your opening body tag:
This line of code is what adds the Step 1 code to your site. You will also want to be sure that this line of code is installed in the correct location just after the opening tag. If this is not installed in the correct location, it can also cause and display issues.
You can find the site key from your Dashboard. To see it, log in via BuySellAds.com, click on your email address at the top of the page, and click “Dashboard“. Click the “Actions” dropdown next to one of your ad zones and click “Ad Code”.
Your site key is the part of the STEP 2 code without the “bsap_“. In this example, ‘4d23a9e08e0ab6a836a2b19f55a52e14‘ is the site key:
- First, you will need to install the Genesis Simple Hooks Plugin via manual installation or by using the plugin search in your dashboard. Then you will install and activate the plugin.
- After that is installed and activated, you will need to navigate to that plugin in the sidebar under “Genesis > Simple Hooks”.
- On that page you will scroll down to where it says “genesis_before Hook”. In the field under “genesis_before Hook”, you will add the STEP 1 code that is on your Ad Code page in your account. (Please copy and paste this code exactly as it is in the dashboard, with no edits or line breaks.)
- Then you will place your STEP 2 zone code in the hook where you want that specific zone to appear. For example, if you created a Sidebar zone that needs to appear in your sidebar, you will scroll down to the appropriate sidebar hook and paste the STEP 2 code there. Just do this for each zone you need to install and be sure to read the hook description to ensure you are pasting in the proper location. (Please copy and paste this code exactly as it is in the dashboard, with no edits or line breaks.)
- Then you will save these changes by clicking on the “Save Changes” button on that page, and your code will be installed. (The “Save Changes” button appears in several places on the hooks page. Just click on any of those buttons to save the changes you have made.)