Documentation

(This is a work in progress, just soft launching )

Getting Started:

This plugin was primarily created to replace the Amazon native ad functionality which was discontinued in August 2023, and help with SiteStripe changes in December 2023, but it’s also a complete ad manager.

Here’s my original video showing some of the setup and Gutenberg settings.. shooting more videos shortly.

Additionally, it offers a way to use WordPress as a remote ad server. This allows users to create ads on one WordPress site and display them on another, similar to any 3rd party affiliate code.

 

Amazon API Setup:

While you can still use BestAdsPlugin without using the Amazon API it’s one of our main features.It requires and Amazon Associates account and existing sales to qualify.

  1. Navigate to the settings page.
  2. Enter your Amazon API key and partner tag. Only required for Amazon Features
  3. Click on ‘Test Amazon Connect’ to ensure successful connection.

Note: Always ensure you follow Amazon’s terms and conditions when using their API.

 

Creating Your Ads:

When you’re ready to start creating and organizing your ads look for Ads > Ad New Post in admin sidebar upper left, should be right below Posts. This is where you’ll make your ads.

You can begin by organizing and pasting in any of your current affiliate ads. Most likely you’ll need to add them either using a Gutenberg Custom HTML block or paste them into Classic Editor. We do not currently have a Classic Editor icon.

Once you make your first ad and publish it, go back to the Ads > Ads listing page and you’ll see the shortcode for that ad. Copy and paste that anywhere on your site to display it, or use the javascript code to display it remotely. The shortcodes will only work on the site you installed BestAdsPlugin on.

Create Ads Using Gutenberg Block:

We’ve got a Gutenberg block for creating Amazon ads and Custom Ads

  1. Create a new Ad post.
  2. Use the Gutenberg block “Best Ads” to customize one, or paste in the shortcodes  (below) using shortcode block, or just paste if using the classic editor.
  3. Adjust settings such as display mode (horizontal/vertical), maximum product count, title and description length, etc.
  4. Preview to check the ad display before publishing.

Remote Ad Loading:

  1. In the Ads > Ads section you’ll find javascript code for each of your ads.
  2. Copy the provided JavaScript code for an ad
  3. Paste it into a third-party page where you want the ad to appear.
  4. Make sure you test this to ensure it works properly.

Shortcodes

Amazon Shortcodes

There are two types of Amazon shortcodes, “keyword” and “asin”.

In this basic keyword example you just replace the word “gardening” with whatever keyword or keyphrase you want to show ads for. You can use “gardening” or “gardening gloves” or “gardening books”. The max number is how many ads you wish to show.

Examples:

Copy
Copy

Attributes

  • mode (default: 'horizontal'): Determines the layout of the ads (e.g., 'horizontal', 'vertical').
  • btitle: Custom title for the ad’s button.
  • asin: Amazon Standard Identification Number. Used to fetch specific product ads.
  • keyword: Keyword to fetch ads related to a specific topic.
  • max (default: 1): Maximum number of ads to display.
  • maxwidth (default: '100%'): Sets the maximum width of the ad block.
  • minwidth (default: '100%'): Sets the minimum width of the ad block.
  • class: Additional custom CSS class(es) for styling.
  • float (default: 'left'): CSS float property to align the ad block.
  • ptag: Amazon partner tag for affiliate tracking.

Custom Ad Creation Shortcodes

Add the shortcode adcreator in your post or page, with optional attributes to customize the ad’s appearance and content.

Example

Copy

Custom Ad Attributes

  • btitle: Optional title for the ad’s action button.
  • minwidth (default: '100%'): Sets the minimum width of the ad.
  • class: Additional CSS class(es) for custom styling.
  • description: Text description of the ad.
  • link: URL the ad points to.
  • image: URL of the ad’s image.
  • title: Title of the ad.
  • price: Price information for the product or service.
  • tlines: Title line height for example 1 = 1 Line, 2 = 2 Lines
  • center_ad: Yes = text-align: center the ad. Remove or make “no” to left align.

Custom Link Menu Shortcodes

This feature is not built into Gutenberg Block editor yet. Shortcode only for now.

The Default style are simple vertical blue buttons, but you can do so much more with attributes and classes.

To get started create a WordPress Menu with a few links and name it: Bap Menu

Then try some of our test codes in an Ad Post and you’ll see exactly how it works

Example

Copy
Copy
Copy

There are two style attributes, “button” (default), and “link” which can be added with: style=”link”

There are two modes, “vertical” (default), and “horizontal” which can be added by mode=”horizontal”

Link Descriptions

You can actually add descriptions as well. This is a very cool feature that a lot of people don’t know about with WordPress link menus. Goto Appearance > Menus > Screen Options (at top of page). And check the “Descriptions” box.

Once you do you can add a description to any link using the attribute: description=”true”

For design reasons this ONLY works with link menus, not buttons. So if you add description=”true” it will automatically make the menu a link menu. You don’t need the style attribute.

Example:

Copy

See my test page with Affiliate Links here. This is made with our BestAdsPlugin Page Generator in 2 minutes.

Classes

There are loads of CSS classes to let you customize these menu ads more.

Colors – red, green, orange, ghost, blue(default)

Sizes – small, large, huge

Styling – bold, block, rounded, shadow, border, bordered (for link box) underline (for links), pipe (for links divider)

Sizes –

Button Width: bw100, bw150, bw200, bw250

Link Container Vertical Width: lw150, lw200, lw250, lw300, lw350, lw400

Advanced Tips:

  • Use the custom CSS box in settings to modify the appearance of your ads. IMPORTANT: The CSS is loaded inside the post, so it won’t work in the WordPress Additional CSS box. You need to ad in Ads > Settings > Custom CSS
  • For varied content, think of tags as categories. You can use them to display niche-specific ads.
  • The plugin currently supports displaying individual ads remotely using JavaScript. Future updates may expand this to tag-based display, but right now it’s just ads.

Finally, are you curious how I made this left sidebar jumplink menu?   See my tutorial here.

testing something

Copy