WordPress.org

Ready to get started?Download WordPress

Forums

WP Bannerize
[resolved] PHP Code don't work (7 posts)

  1. infodes
    Member
    Posted 2 years ago #

    After upgrading WP Bannerize version 3.0.1, PHP function for WP Bannerize stop to work. The function is in header.php to show banner group before header logo. Till previous version, this work perfectly, but now banner group never show. I change to new PHP code:

    <?php if(function_exists( 'wp_bannerize' ))
    	wp_bannerize( 'group=MYGROUP' ); ?>

    But same results.
    Help would be very, very, appreciated...
    Thanks in advance.

    http://wordpress.org/extend/plugins/wp-bannerize/

  2. gaspar
    Member
    Posted 2 years ago #

    I inspected this new code. It seems developer forget to print out the code :(
    @wpBannerizeFunctions.php line 21
    i just added echo() command:
    echo $wpBannerizeFrontend->bannerize( $args );

    i got it work again.. hope that helps!

  3. infodes
    Member
    Posted 2 years ago #

    Sorry, not found at wpBannerizeFrontend.php, line 21. In 3.0.1 version, line 21 at wpBannerizeFrontend.php shows:

    wp_enqueue_script('wp_bannerize_frontend_js', $this->uri . kWPBannerizeJavascriptFrontend,

    Any news idea?
    Thanks.

  4. gaspar
    Member
    Posted 2 years ago #

    I typed wrong filename before, sorry!
    Correct file is: wpBannerizeFunctions.php
    Corrected my previous post also..

  5. infodes
    Member
    Posted 2 years ago #

    Great, gaspar!!! Now banner is visible, but if you have a banner group (like me, two banners) in radom mode, plugin displays the two banners but no alternate both banners in same position, like with old plugin version.

    Any idea?
    Thanks.

  6. infodes
    Member
    Posted 2 years ago #

    Sorry... Correct code for alternate banners in same position (almost for me) is:

    <center><?php wp_bannerize('group=hella&container_before=&container_after=&before=&after=&limit=1&random=1'); ?></center>

    Now all work correctly.
    Thanks again gaspar. Great job!
    Regards.

  7. gaspar
    Member
    Posted 2 years ago #

    Great! You can mark this topic resolved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic