WordPress There is no more time for a long time Platforma the blogging. Allow us to develop from simple blogs with one design minimalist until portals and Forums complex or evenmagazine online in all the rule, grace pluginacquis WooCommerce and to others e-commerce functions ce pot fi integrate in WordPress.
Except for sites presentation of companies and those nonprofit which are supported by various entities, “life” to a website of proportions can only be supported from advertisement or from products / services which he Le win. It is about the same thing as in the case of television, which are supported exclusively by advertising.
The diversity of the deposits on which an advertisement (a banner) can be listed on a website, strengthens us that it is visible in the optimal parameters, regardless of as the web page in which the advertisement is found is accessed from mobile, tablet or desktop.
WordPress users who want certain advertisements or items to be visible only on the mobile version or only on the desktop version of a web page, have a very simple WordPress function.
How to set an advertisement to appear only on the mobile or desktop version of a website
The function “wp_is_mobile” help us force an item (an advertisement, in our case) to appear Only then the web page is accessed from an Android mobile, iOS or Windows Mobile.
Here's what the code looks like for an advertisement to be visible only on mobile:
<? Php
IF (wp_is_mobile ()) {
	Code_reclama_ or element
}
?>
Another option is to put the code between PHP functions:
<?php if (wp_is_mobile() ) { ?>
code_reclama_sau_ement
<?php }?>
In this way, the advertisement code will be visible only for the browsers identified as a mobile device.
In the scenario we want as a advertise to be visible only on desktop version of the web page, in front of “wp_is_mobile” it will be put “!”, which will determine that the next content is visible on all devices, except on the mobile version.
Example code:
<?php if (!wp_is_mobile() ) { ?>
code_reclama_sau_ement
<?php }?>
This way you can handle the elements on a web page, depending on the device from which it is accessed.
 
			