Below, you’ll find a detailed guide on how to add the The Moneytizer Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the The Moneytizer Plugin shortcode not to show or not to work correctly.
Before starting, here is an overview of the The Moneytizer Plugin and the shortcodes it provides:
"The Moneytizer is a WordPress plugin that optimizes your website's revenue potential. With its user-friendly interface, it streamlines ad placement and monetization processes. Transform your site into a profitable platform with The Moneytizer."
- [themoneytizer_shortcode]
The Moneytizer [themoneytizer_shortcode] Shortcode
The Moneytizer shortcode is a powerful tool that allows users to display ads in specific areas of their website. This shortcode retrieves ad spaces from the Moneytizer API and displays them on the website. By specifying the ‘id’ attribute, users can choose precisely where the ad will be shown.
Shortcode: [themoneytizer_shortcode]
Parameters
Here is a list of all possible themoneytizer_shortcode shortcode parameters and attributes:
id
– Represents the unique identifier of the ad space
Examples and Usage
Basic example – A simple shortcode usage to display a specific ad space by referencing its ID.
[themoneytizer id=1 /]
Advanced examples
Using the shortcode to display multiple ad spaces by referencing their IDs. The ad spaces will load in the order they are listed.
[themoneytizer id=1,2,3 /]
Using the shortcode to display an ad space and customize its appearance. In this example, the ad space with ID 1 is displayed with a custom width and height.
[themoneytizer id=1 width=300 height=250 /]
Using the shortcode to display an ad space and control its visibility. In this example, the ad space with ID 1 is displayed only to logged-in users.
[themoneytizer id=1 visible_to=logged_in /]
Please note that these examples assume that the ‘themoneytizer’ plugin has been properly configured and the specified ad spaces exist.
PHP Function Code
In case you have difficulties debugging what causing issues with [themoneytizer_shortcode]
shortcode, check below the related PHP functions code.
Shortcode line:
add_shortcode($shortcode, 'themoneytizer_shortcode');
Shortcode PHP function:
function themoneytizer_shortcode( $atts ) {
$api = new themoneytizer_API();
$display = $api->getSpace($atts['id']);
return $display;
}
Code file location:
the-moneytizer/the-moneytizer/themoneytizer-shortcode.php
Conclusion
Now that you’ve learned how to embed the The Moneytizer Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.
Leave a Reply