How to Insert Ad Spaces on WordPress
Once you have created an Ad Space, you can insert it anywhere on your WordPress site using shortcodes, page builders, or theme templates.
1. Using the WordPress Shortcode
Section titled “1. Using the WordPress Shortcode”Every ad space generates a unique shortcode formatted as:
[ad-fuz ad_space_id="17"](Replace 17 with your actual Ad Space ID from the Ad Spaces Manager).
Insertion Methods by Editor / Page Builder
Section titled “Insertion Methods by Editor / Page Builder”- Open any Post, Page, or Widget Area in the WordPress Block Editor.
- Click the
+(Add Block) icon. - Search for AdFuz Ad Space and insert the block.
- In the block settings sidebar on the right, select your Ad Space from the dropdown menu.
- Save or Update your post/widget.
- Open any Post, Page, or Widget Area in the WordPress Editor.
- Click the
+(Add Block) icon. - Search for the Shortcode block.
- Paste your shortcode:
[ad-fuz ad_space_id="17"]. - Save or Update your post. (Note: Shortcode blocks display the raw code in the admin editor and render the actual ad on the frontend).
- Open the page in your visual page builder.
- Search for the Shortcode widget in the elements panel.
- Drag the widget into your desired column or section.
- Paste
[ad-fuz ad_space_id="17"]in the Shortcode field. - Click Update / Publish.
- Go to WordPress Admin > Appearance > Widgets.
- Expand your target widget area (e.g. Primary Sidebar or Footer Column).
- Add an AdFuz Ad Space block, Shortcode block, or Custom HTML widget.
- If using shortcode, paste
[ad-fuz ad_space_id="17"]. - Click Update to publish.
To hardcode an ad space directly into your child theme (e.g. header.php, single.php, footer.php):
<?php// Insert AdFuz Ad Space directly into theme templateif ( shortcode_exists( 'ad-fuz' ) ) { echo do_shortcode( '[ad-fuz ad_space_id="17"]' );}?>Responsive Auto-Centering CSS
Section titled “Responsive Auto-Centering CSS”Ad spaces are wrapped in a responsive CSS container with the ID adfuz-space-XX. You can center or add custom margins via your theme’s customizer if desired:
/* Center an AdFuz ad container on the frontend */.adfuz-ad-space-container { display: flex; justify-content: center; align-items: center; margin: 1.5rem auto;}