Conditional Widgets
[resolved] How can I use this plugin to control php code in the header file of my theme? (2 posts)

  1. otherwhirl
    Posted 2 years ago #


    I have php code : '<?php echo adrotate_group(3); ?>' in the header.php file of my theme.

    I need someway to control which pages, categories and tags banners are displayed for this adgroup so that ads are shown where they should be within my site.

    Can i do this with Conditional Widgets? If so, how?
    If not, any simple suggestions (preferably a plugin that will get the job done....)



  2. Bob Gregor
    Posted 2 years ago #

    You'd need to add a sidebar to the header, then use this plugin to control the display of widgets within that sidebar.

    To create a new sidebar for your header: http://codex.wordpress.org/Function_Reference/register_sidebar

    You'd need to create a new widget control for the adrotate_group php code, first by extending & customizing the WP_Widget class http://codex.wordpress.org/Widgets_API, then registering your new widget with http://codex.wordpress.org/Function_Reference/wp_register_sidebar_widget

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Conditional Widgets
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic