Help Center Manage Your Account Ad Tag
How do I set up advertising on WordPress?
WordPress is a popular publishing platform with many advanced customizations to suit your own preferences. To place ads into your WordPress blog/CMS, you can use AdSpeed plugin for WordPress. For more advanced ad setup, you would need to place the serving code directly into the WordPress templates.Display ads on the sidebar
You can install AdSpeed plugin for WordPress to display ads on the sidebar. However, if you cannot install plugin for your WordPress installation or need custom parameters, you can use the WordPress built-in Text widget:- Open Dashboard. Choose Appearance > Widgets.
- Drag the 'Text' widget from the Available Widgets to the Sidebar section.
- Open the 'Text' widget in the Sidebar. Paste the zone's ad tag into the content area. Click Save. To get the zone's ad tag, you need to sign into your AdSpeed account, click on the zone name and click on tab "Ad Tag".
Use plugin Widget Logic
For an easier integration without having to modify the templates and codes directly, you can install the Widget Logic to enable the widget to display on certain conditions, certain pages, sections or categories. Learn moreDisplay ads only on the homepage
You would use the condition tag is_home() in the homepage.php (or index.php). For default theme, the file would be in this folderhtdocs/wp/wp-content/themes/default/
<?php if(is_home()) { ?> SERVING CODE <?php } ?>
Display different ads for each content category
Our system is very flexible in the way you sell and organize ads. In WordPress, you can use the Display Widgets Plugin or you can use WordPress API is_category() directly. These are several methods to organize the ads:1. One zone per category
You can create multiple zones, one for each category and get the serving code for the zone to put into the WordPress template. Any/all ads linked to this zone will get served in the category. This is the easiest solution to setup and manage. However, if you have many many categories then setting up the first time might take some time. To address this labor-intensive operation, you can use our API (application programming interface) to create the zones in batch.2. URL targeting
You can create a few zones based on ad location (eg: top, right, bottom) that are shared across categories. The ads linked to these zones then have URL targeting. For example: only display AdA when the URL has "CategoryABC"). This requires that the URL follows a pattern that contains the defined category.Display category ads on an article/post
If a post is placed in one or more categories, you might want to display ads only for these categories. You can use the Display Widgets Plugin or edit the single.php template file and use the function in_category() to check if the post is linked to certain categories.<?php if (in_category('Travel')) { ?> [Serving Code for Category/Zone Travel] <?php } ?>
Other Articles in Ad Tag
This section describes the ad tag (serving code) with basic and advanced settings. It includes common ad serving setup instructions and answers frequently asked questions when integrating the ad tag into your site, blog or app.
- Accelerated Mobile Pages Project - AMP Ad Tag
- Can I have ads refresh automatically without a page reload?
- How can I avoid document.write warning in Chrome?
- How can I avoid duplicate ads on the same page?
- How can I combine multiple ads in the same placement?
- How can I defer ads until after the page has finished loading?
- How can I display an ad only when it is visible on screen?
- How can I measure ad viewability?
- How can I mix ad dimensions or mix banners with text-link ads?
- How can I put ads into my blog/website?
- How can I serve multiple ad dimensions in the same place?
- How can I serve multiple zones with a single server request?
- How can I support click tracking for external ad servers?
- How can I turn off ad serving error messages?
- How do I add current timestamp into the serving code?
- How do I display mobile ads using Android WebView?
- How do I display mobile ads using Apple iOS WKWebView?
- How do I integrate AdSpeed mobile ad serving API?
- How do I make ads responsive on mobile devices?
- How do I pass custom data and variables into the ad?
- How do I setup a companion ad in video ad serving?
- How do I setup a passback ad tag?
- How do I switch to secure SSL/https ad serving?
- Should I use protocol-relative URLs in ad tags?
- What are custom ad serving settings and variables?
- What are different formats of serving code?
- What are different types of ad tag?
- What are the effects of ad blocking software?
- What is the pop-up and pop-under ad tag?
- What is the serving code or ad tag?
- What is WMODE for SWF ads? How can I change it?
- Where is the publisher-side file for iframe busting?
- Why doesn't the provided HTML serving code work?
Cannot find an answer for your question? Ask our Customer Care team
Related
- How do I use AdSpeed Ad Server in WordPress?
"In additional to the manual ad placement method, AdSpeed has released a plugin for WordPress, a popular publishing platform. This ..."
- How can I put ads into my blog/website?
"Our ad server can display ads on all blog platforms, web authoring software and content management systems (CMS) via a ..."
- How do I use AdSpeed Ad Server in Movable Type?
"If your site is powered by Movable Type, you will find our plugin for Movable Type easy to install and ..."
- Target Keywords
"By setting up keyword targeting for an ad, you can choose to show or hide this particular ad when the ..."
- Zone
"Zone is ad placement. A zone consists of one or more ads. Zones display, serve, shuffle, cycle, randomize, and rotate ..."