WordPress.org

Ready to get started?Download WordPress

Forums

AdRotate
[resolved] Default AdCode (7 posts)

  1. Mte90
    Member
    Posted 10 months ago #

    In my site i have the same AdCode for all the banner but there isn't a setting for choose a default code.
    Every time i need to insert manually.
    It's possible add this feature?

    http://wordpress.org/plugins/adrotate/

  2. Mte90
    Member
    Posted 10 months ago #

    For fix the problem i have added a javascript code in my template:

    function adrotate_default() {
    	if($_GET['page']=='adrotate-ads') {
    		echo '<script type="text/javascript">
    		jQuery(document).ready(function() {
    			if (jQuery("#adrotate_bannercode").text() == "") {
    			jQuery("#adrotate_bannercode").text("<a href=\'%link%\'><img src=\'%image%\' /></a>");
    			}
    		});
    		</script>';
    	}
    }
    
    add_filter('admin_head', 'adrotate_default');
  3. iGenius
    Member
    Posted 10 months ago #

    This will be a nice feature!!

    Great!!

  4. Arnan de Gans
    Member
    Plugin Author

    Posted 10 months ago #

  5. Mte90
    Member
    Posted 10 months ago #

    my solution is better because my staff does not know html, so they have less of the steps to add a new banner

  6. Mte90
    Member
    Posted 10 months ago #

    my solution is better because my staff does not know html, so they have less of the steps to add a new banner...

  7. Arnan de Gans
    Member
    Plugin Author

    Posted 10 months ago #

    Until an ad is different from your 'template' or when your theme has an update and overwrites your functions.php (and thus your edit) ;)

    But sure, your method has less clicking to achieve a similar result.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.