Add some fileds to the wp_posts table

The second approach (joining additional table) is better for several reasons. When plugin is not active, you won’t retrieve it’s data (or with other words, you won’t select additional data unless you explicitly join it) It’s more maintainable. You can alter your plugin table without altering posts table and vice versa. The join most likely … Read more

Add Content to Content()

// Hook into the_content filter here function append_to_the_content($content){ ob_start(); // Start doing stuff here … // End doing stuff here … $new_content = ob_get_clean(); return $content.$new_content; // Append new content return $new_content.$content; // Prepend new content } // function append_to_the_content($content) // 11 priority avoid wpautop() that messes custom HTML add_filter(‘the_content’, ‘append_to_the_content’, 11); Regards.

WordPress programming video tutorials [closed]

Couple of sites I can refer: Start with wordpress codex http://codex.wordpress.org/ http://net.tutsplus.com you may find good starting point there. Search Youtube you can find some good ones there too. And if you feel like paying for it try some tutorial series from http://lynda.com Search google. I think its the best way to go 🙂 there … Read more

how to activate a plugin inside a theme

TGM Plugin Activation Class looks awesome!* […] the TGM_Plugin_Activation class can automatically install and activate multiple plugins that are either pre-packaged with a theme or downloaded from the WordPress Plugin Repository. And here’s an introduction to it: http://wp.tutsplus.com/articles/intro-to-tgm-plugin-activation-class-for-wordpress/ *Disclaimer: I haven’t had a chance to try it out for myself… yet.

How can I modify page content in the admin panel?

In wp-admin/edit.php at line 189 you can see that the title text is grabbed from the labels of the post type: <h2><?php echo esc_html( $post_type_object->labels->name ); ?> … </h2> When you register a new post type (register_post_type) you can also define its labels. The available labels are listed in the Codex.

Get path to themes CSS file inside of a Plugin

Get the absolute path: get_stylesheet_directory() Get the URI: get_stylesheet_directory_uri() Edit: Here’s a proof of concept plugin. It will just print out the stylesheet path and uri in the head tag of your site (front end). If these functions are not working in your plugin, there might be some other factor not explained in the OP. … Read more

Mask and Track Outbound Links

I would let something like Google Analytics do the tracking for you with something like event tracking. Look into Yoast’s Google Analytics plugin, it will let you do this fairly easily. Otherwise, something like Redirection would be good for creating redirects. And, of course, you can see how many times each was clicked. I’ve used … Read more