How to use mhchem in wordpress?

The Mathjax plugin provides a filter named mathjax_config that can be used to add config parameters, something similar to this should do the trick: add_filter( ‘mathjax_config’, function() { return [‘Tex’ => [ ‘extensions’=> [ ‘path/to/mchem.js’] ] ]; }); In the event you’d like to remove dependency on the plugin, you’ll need to enqueue the mathjax … Read more

Conflict between mathax and wp-Typography

You can tell wp-Typography to not process the code inside certain elements — go to Settings » wp-Typography in your site’s backend and add the appropriate items to the appropriate areas. If you’re not sure what the appropriate items are, have a look at the source of one of the pages where you’ve got some … Read more

MathJax inside shortcode

You cant call a shortcode inside a shortcode they do not automatically nest, you need to use do_shortcode($content) like this (i am assuming the name of your shortcode): function alert_shortcode( $atts, $content = null ) { return ‘<div class=”alert alert-‘ . $atts[‘type’] . ‘” role=”alert”><p class=”alert-title”>’ . $atts[‘title’] . ‘</p>’ . do_shortcode($content) . ‘</div>’; }