How to un-attach rich text editor from named textarea elements

Currently you’re telling it to target all textareas on the page so you need to change $init[‘mode’] = ‘textareas’; to $init[‘mode’] = ‘specific_textareas’ or $init[‘mode’] = ‘exact’ and then name the textarea by id where you have $init[‘elements’] = ‘category_description,description’; defined. To read more about tinyMCE options go to http://tinymce.moxiecode.com/wiki.php/Configuration and the mode configuration description … Read more

How to call shortcode function directly and pass $atts

do_shortcode() just parses the string. You have to use echo or print to print it out. function_exists() expects a string that matches a function name. After looking at the plugin, I would try this code: <?php if ( function_exists( ‘mediacategories_func’ ) ) { ?> <h1>Inspiration</h1> <?php print mediacategories_func( array( ‘categories’ => 6 ) ); }

What is the best way to output plugin result in certain url

There are two steps: function my_plugin_rewrite_rule() { global $wp; $wp->add_query_var( ‘show_hello_world’ ); add_rewrite_rule( ‘show-hello-world/?$’, ‘index.php?show_hello_world=1’, ‘top’ ); } add_action( ‘init’, ‘my_plugin_rewrite_rule’ ); That takes care of rewriting. Remember to flush the rewrite rules. Now, your plugin can check for get_query_var( ‘show_hello_world’ ); and load a certain file: function my_plugin_template( $path ) { if ( get_query_var( … Read more

Integrating plugins in themes

1) Is integrating plugins a common practice? Not really. Normally you got a theme that offers a base functionality. You then only extend the theme with plugins for special purpose like twitter stuff, event calendars, etc. Imo it makes sense. I’m currently working on an extremly slim theme that has some plugins (OOP approach) that … Read more

WordPress A-Z Navigation

Isnt it simpler and free from the need using plugin (always depending on the need for the author to update to the current wordpress version) to just use tags and just get all the tags (thus getting all the posts) of the letter “a” for example ?

Override dynamic_sidebar() in plugin?

dynamic_sidebar() calls wp_get_sidebars_widgets() to get the list of all sidebars and their widgets. This output is filtered through sidebars_widgets, so you can modify it to add or remove widgets. This array only contains widget IDs, so you need to register the widget instance too (it should end up in the global $wp_registered_widgets array). I think … Read more