How To Install BuySell Ads (BSA) Code Manually In Any Theme

There’s different ways to install BSA code in your theme however this solution should work in any theme.

There’s 3 steps involved.

  1. Add Javascript to file in child theme.
  2. Load Javscript in theme.
  3. Hook in banners.

Install BSA Ad Code

When you login to your BuySellAds Dashboard and go to Actions > Ad Code from the small drop down menu, you’ll see 2 snippets of code.

bsa ad code

On the same page below the Javascript snippets you’ll find some style settings where you can add/modify the CSS for your ad.

style ad settings using CSS

You can select which CMS you are using and follow the instructions or install the code using the method i’ll give you now.

1. Add Javascript To New File

Simply paste your Javascript into a new file named bsa.js using a code editor and upload to your child themes root directory or js folder.

2. Load Javascript

You can then load the BSA Javscript using wp_enqueue_scripts like this from your child themes functions.php file.

This code assumes you uploaded your Javascript file into the root directory from step 1. If you didn’t, make sure the file path is correct otherwise the Javascript won’t load.

3. Hook In BSA Banner Div

You can then add a custom function to your child themes functions.php file and use any WordPress or theme specific hook to display your banner in any position your theme enables you to.

BSA suggest using the Genesis Simple Hooks plugin to install the ad code as one solution.

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.