Sidebar “Wrapper” Plugin/Widget?

You can use the WordPress widget API to create a custom widget containing your PHP script. Very simple example: class shoutcast_widget extends WP_Widget { function shoutcast_widget() { $widget_ops = array( ‘description’ => ‘Describe your widget here’ ); parent::WP_Widget(false, ‘Name Your Widget Here’, $widget_ops ); } function widget( $args, $instance ) { extract( $args ); extract( … Read more

Breadcrumb NavXT plugin – exclude ‘home’ page

Opne you header.php file and look for something like this: <div class=”breadcrumbs”> <?php if(function_exists(‘bcn_display’)) { bcn_display(); } ?> </div> then before the call for bcn_display(); make sure you are not on the home page so basicaly replace bcn_display(); with: if(!is_home() && !is_front_page()){bcn_display();}

AJAX search posts and pages

The error seams to come from another source, not your query. You don’t use wp_options table. So maybe skipping $wpdb->show_errors(); $wpdb->print_error(); would make things even work. But probably there is an error somewhere else. To get an overview how to create AJAX search helper, you can check here: http://www.wpcodelab.com/archives/create-a-custom-ajax-search-for-wordpress

When to load auto-login code?

I ended up using the ‘plugins_loaded’ action or state from http://codex.wordpress.org/Plugin_API/Action_Reference: In my main plugin file I have: include_once( ‘lib/class-my-auth.php’ ); // your class file here add_action( ‘plugins_loaded’, ‘My_Auth::auto_login’ ); In lib/class-my-auth.php: <?php class My_Auth { private static $successfully_connected_Main_to_WP = false; public static function auto_login() { $username = …; // Integrate with main site to … Read more

Help With MySQL to WPDB Query Conversion

Instead of using $wpdb->query(), use $wpdb->get_results(). This method allows you to specify a return type so the query is returned as an associative array. For example … $results = $wpdb->get_results( “SELECT * FROM mb_download_manager WHERE filename=”” . $namemeta . “.zip””, ARRAY_A ); This will return you an indexed array of associative arrays … so you … Read more