Generate Own Custom CSS Button with icon

What you are seeing is from a short code, a shortcode that does not exist anymore. Since you’ve changed themes and seeing this, it means that that shortcode is defined in your previous theme’s functions.php What you’ll need to do is, look at your previous theme’s functions file, and locate where the shortcode is defined. … Read more

Shortcode from admin textarea to page

Your sort of right, the WordPress editor saves content thru a filter called the_content. This filter is used to filter the content of the post after it is retrieved from the database and before it is printed to the screen. Apply this filter to simulate TinyMCE formatting. <?php echo apply_filters( ‘the_content’, $options[‘textarea_input’]); ?>

TinyMCE Javascript URL Question

I think the best way is to use the before_wp_tiny_mce() hook. Then, you can define the url in PHP; and pass it to the page so it is available to TinyMCE. function sgp_before_wp_tiny_mce() { ?> <script type=”text/javscript”> var sgp_plugin_url = “<?php echo plugins_url(‘shortcode_generator_popup.php’, __FILE__); ?>”; </script> <?php } add_action(‘before_wp_tiny_mce’, ‘sgp_before_wp_tiny_mce’); You may need to change … Read more

Can i set css class for table via TinyMCE [closed]

This is possible with a custom plugin, but lot of effort. I like the way about css in the front end. The table button in TinyMCE creates a default table, without classes, like: <table> <tr> <td>Text</td> <td>Text</td> <td>Text</td> </tr> <tr> <td>Text</td> <td>Text</td> <td>Text</td> </tr> <tr> <td>Text</td> <td>Text</td> <td>Text</td> </tr> </table> Below a simple example to … Read more

Adding custom post formatting options in custom post types

maybe it’s too late, but I found out how to solve this so I think I could share my solution. You have to access the global $post variable to find out the post type: function haet_custom_toolbar( $initArray ) { global $post; $post_type = get_post_type( $post->ID ); if( ‘page’ == $post_type ){ $initArray[‘toolbar1’] = ‘formatselect,styleselect,|,bold,italic,|,alignleft,aligncenter,alignright,|,pastetext,removeformat,|,undo,redo,|,bullist,numlist,|,link,unlink,|,spellchecker,fullscreen’; $initArray[‘toolbar2’] … Read more