Meks Easy Ads Widget Shortcode

Below, you’ll find a detailed guide on how to add the Meks Easy Ads Widget 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 Meks Easy Ads Widget Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Meks Easy Ads Widget Plugin and the shortcodes it provides:

Plugin Icon
Meks Easy Ads Widget

"Meks Easy Ads Widget is a user-friendly WordPress plugin, designed to make the task of ad management simple and efficient. Easily create and place ads anywhere on your website."

★★★★✩ (14) Active Installs: 20000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [meks_easy_ads_blocker_message]

Meks Easy Ads Widget [meks_easy_ads_blocker_message] Shortcode

The Meks Easy Ads Widget shortcode is a tool that displays a customizable message to users with ad-blockers enabled. This shortcode allows you to appeal to your visitors to disable their ad-blocker, thus supporting your website. The message and title are customizable, giving you flexibility in your communication.

Shortcode: [meks_easy_ads_blocker_message]

Parameters

Here is a list of all possible meks_easy_ads_blocker_message shortcode parameters and attributes:

  • title – Specifies the title of the ad blocker message
  • message – Sets the content of the ad blocker message

Examples and Usage

Basic example – A simple usage of the shortcode to display a default AdBlocker message.

[meks_easy_ads_blocker_message /]

Advanced examples

Customizing the title and message of the AdBlocker message. This shortcode will first try to load by ID, but if not found, it will try to load by title.

[meks_easy_ads_blocker_message title="Custom Title" message="Custom Message" /]

Modifying the title and message of the AdBlocker message with more complex text. This shortcode will first try to load by ID, but if not found, it will try to load by title.

[meks_easy_ads_blocker_message title="Please Support Us" message="Our website relies on ad revenue. Please consider supporting us by disabling your ad blocker. Thank you!" /]

Using the shortcode with a different language. This shortcode will first try to load by ID, but if not found, it will try to load by title.

[meks_easy_ads_blocker_message title="Por favor, apóyanos" message="Nuestro sitio web depende de los ingresos por publicidad. Por favor, considera apoyarnos desactivando tu bloqueador de anuncios. ¡Gracias!" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [meks_easy_ads_blocker_message] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'meks_easy_ads_blocker_message', 'meks_shortcode_easy_ads' );

Shortcode PHP function:

function meks_shortcode_easy_ads( $atts ) {

	$atts = shortcode_atts(
		array(
			'title'   => __( 'AdBlocker Message', 'meks-easy-ads-widget' ),
			'message' => __( 'Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.', 'meks-easy-ads-widget' ),
		),
		$atts
	);

	$args = array(
		'before_title'  => '<h4 class="widget-title">',
		'after_title'   => '</h4>',
	);

	ob_start();

	the_widget( 'MKS_AdsBlocker_Widget', $atts, $args );

	$output = ob_get_contents();
	ob_end_clean();

	return $output;

}

Code file location:

meks-easy-ads-widget/meks-easy-ads-widget/inc/template-functions.php

Conclusion

Now that you’ve learned how to embed the Meks Easy Ads Widget 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.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *