Jamie
Forum Replies Created
-
Forum: Plugins
In reply to: [Theme Test Drive] Default Access Level not set correctlyExcellent – thank you!
Ahh that makes sense. Thanks for the explanation. And again, very cool of you to help out with this.
I did look at the code of your plugin before I posted this thread but it wasn’t clicking with me.
Thanks, definitely will check on that. I thought the whole purpose of setting merge to true was to but it seems more complicated than that. Super awesome of you to help figure out this issue π
Excellent – thanks for your help, Josh! That did work in both my theme and plugin. I had attempted a solution with array_merge but wasn’t sure what I was doing (obviously).
Interesting still, though, that the first code works in a plugin but not in a theme. Not sure if that is intended by WP or what!
Hi Josh! Thanks for responding. I followed a tutorial on this and this is the code I’m using
function my_mce_before_init_insert_formats( $init_array ) { // Define the style_formats array $style_formats = array( // Each array child is a format with it's own settings array( 'title' => 'Content Block', 'block' => 'span', 'classes' => 'content-block', 'wrapper' => true, ), array( 'title' => 'Blue Button', 'block' => 'span', 'classes' => 'blue-button', 'wrapper' => true, ), array( 'title' => 'Red Button', 'block' => 'span', 'classes' => 'red-button', 'wrapper' => true, ), ); // Insert the array, JSON ENCODED, into 'style_formats' $init_array['style_formats_merge'] = true; $init_array['style_formats'] = json_encode( $style_formats ); return $init_array; } // Attach callback to 'tiny_mce_before_init' add_filter( 'tiny_mce_before_init', 'my_mce_before_init_insert_formats' );Following this tutorial here: http://www.wpbeginner.com/wp-tutorials/how-to-add-custom-styles-to-wordpress-visual-editor/
Things to note:
I’ve moved the merge code to different locations to see if that made a difference. I tried it after the$init_array['style_formats'] = json_encode( $style_formats );line as well as before$style_formats = array([Edited. Thought I had new information to add but I do not. Sorry]
Forum: Plugins
In reply to: [The Events Calendar] Events Page Not WorkingI work for Headway Themes in support and I can confirm that having a prior event calendar plugin installed that uses the post type event does definitely conflict with this plugin when using Headway (can’t speak for any other theme).
I would imagine a page called events would as well.
With a fresh install of WP and HW, the plugin and Headway work together.
Forum: Plugins
In reply to: [Adminer] Invalid CSRF token. Send the form again.I’m getting this error when trying to export the tables.
Forum: Installing WordPress
In reply to: InstallationCheck your wp-config for any missing single quote marks around items.
Forum: Fixing WordPress
In reply to: PluginsWhat do you mean when you go to dashboard to update the page?
Do the plugins appear on the plugins page?