Tag Info

New answers tagged

0

Try the following code: function caption_shortcode( $atts, $content = null ) { $content = do_shortcode($content); return '<span itemprop="articleSection">'. str_replace( array( '<', '>' ), array( '&lt;', '&gt;' ), $content ) .'</span>'; } add_shortcode( 'source', 'caption_shortcode' ); remove_filter( 'the_content', ...


0

ok so finally found a solution to this. i had to edit class-wp-editor.php and include the following for the $first_init array 'setup' => 'function(ed) { ed.onGetContent.add(function(ed, o) { // Replaces all a characters with b characters ...


2

You can create a new plugin with the mce_external_plugins filter.. and link it to a js file. Then, in that file you can do your processing. function tinymce_init() { // Hook to tinymce plugins filter add_filter( 'mce_external_plugins', 'tinymce_plugin' ); } add_filter('init', 'tinymce_init'); function tinymce_plugin($init) { // We create a new ...


0

Here is the sample complete code to do this. See reference link also. // Add term page function pippin_taxonomy_add_new_meta_field() { // this will add the custom meta field to the add new term page ?> <div class="form-field"> <label for="term_meta[custom_term_meta]"><?php _e( 'Example meta field', 'pippin' ); ...


-1

To add meta box with editor in category edit page, please see this link This shows some example to create/use text fields, but you could simply use wp_editor() function to load default WP editor anywhere inside WordPress.


0

It depends on the skill level of your final user, but for most of them HTML is hard (and it is hard when you try to achieve specific complex layout even for people with technical knowledg0e), therefor the less your users will have to write HTML the more happy they are likely to be. If you can eliminated the need for understanding HTML by writing templates ...


0

I use multiple templates, but also use code for some pages. For example, if I have a site with 3 sections, About, Products, and Research I would create page-about.php, page-products.php and page-research.php. These can be customized as necessary though usually they are simply pulling in unique sidebars which I want to include on all pages within that ...


2

I am probably late to this party but after using the above solution, I soon realized that page load speed of the editor had severely been crippled! Taking a keen look at the code, I realized that the code keeps executing long after tinyMCE.activeEditor has been initialized. The code uses The setInterval() method which evaluates an expression at specified ...


2

I had a lot of trouble finding information and examples of this, so here you go: https://github.com/dtbaker/wordpress-mce-view-and-shortcode-editor This converts a [shortcode] into a nice custom view to match the frontend, and adds an edit button for easy shortcode editing. <?php /** * Class dtbaker_Shortcode_Banner * handles the creation of ...



Top 50 recent answers are included