WordPress stats API key

This is why: http://plugins.trac.wordpress.org/browser/stats/tags/1.7.2/stats.php#L685 The deactivation hook deletes your database information. I’m guessing you’re manually deactivating the plugin, updating, and then re-activating? If so, that runs the deactivation hook. Fortunately, that’s not from the latest version. This is: http://plugins.trac.wordpress.org/browser/stats/tags/1.7.3/stats.php#L686 So that shouldn’t happen anymore. By the way, you shouldn’t think that this means you were … Read more

Related posts widget or plugin needed

@Scott B, It looks like they are using a related posts query based on category. When a single Item (post) is being displayed the query looks up the category id then displays posts from the same category. Add The following code to your sidebar or even to the bottom of single.php depending on where you … Read more

Custom Shortcode Broken in WordPress 3.1

You didn’t add the shortcode via the shortcode API. WordPress only recognizes shortcodes if they are added with: add_shortcode( ‘yourshortcode’, ‘yourshortcodefunc’ ); I personally would not use preg_replace for this because it is more of a hit and miss. You should follow the official guidelines off the WordPress Codex. Recommended code structure for shortcodes is: … Read more

WP-TweetButton is not displaying the tweet button if this is set to “Manual.” [closed]

Looks like you’ve mis-named the function. It is the_tweetbutton(), rather than tweetbutton(). Also, you should always wrap Plugin-added function calls in if (function_exists()) conditional wrappers. Putting that together, this: <div id=”tweet-button”> <?php tweetbutton(); ?> </div> Becomes this: <div id=”tweet-button”> <?php if ( function_exists( ‘the_tweetbutton’ ) ) the_tweetbutton(); ?> </div>

wordpress check wp_head and wp_footer

Technically to check if theme runs wp_head and wp_footer hooks you can: hook into shutdown check that you are in front end use did_action() to determine if hooks fired save the result (in option for example) with theme name to access and use later However in practice I agree with Chip Bennet that these hooks … Read more