To display LaTeX math formulas in Elementor, you can use the following solutions:
1. Use Elementor's "HTML" Widget with WP QuickLaTeX
If WP QuickLaTeX works via shortcodes in Gutenberg, you can force it to work in Elementor by:
- In Elementor, drag an HTML Widget (not the "Text Editor" widget) into your page.
- Insert the raw LaTeX shortcode directly:
HTML:
[latex]$\overrightarrow { { M(F) }_{ O } } =\overrightarrow { OA } \wedge \overrightarrow { F } $[/latex]
- Run HTML
(Replace [latex] with the exact shortcode syntax your plugin uses.)
2. Enable Shortcode Parsing in Elementor
Some users report that Elementor’s Text Editor widget strips shortcodes. To fix this:
- Edit with Elementor → Add a Text Editor widget.
- Paste your LaTeX code with shortcodes (e.g., [latex]...[/latex]).
- Go to Elementor → Settings → Advanced and toggle on Enable Unfiltered File Uploads & Allow Shortcodes.
3. Use MathJax with Elementor
If WP QuickLaTeX still doesn’t work, switch to a MathJax-based plugin (works universally in WordPress):
- Install a plugin like MathJax-LaTeX or MathJax Block.
- In Elementor, use a Text Editor or HTML Widget and write LaTeX directly:
Code:
Inline: \( \overrightarrow { M(F)_O } = \overrightarrow{OA} \wedge \overrightarrow{F} \)
Block: \[ \overrightarrow { M(F)_O } = \overrightarrow{OA} \wedge \overrightarrow{F} \]
4. Use Gutenberg Blocks Inside Elementor
If you want to keep using WP QuickLaTeX:
- Install Elementor Blocks for Gutenberg.
- In Elementor, use the "Gutenberg Block" widget to embed your existing LaTeX-enabled Gutenberg blocks.
5. Custom CSS/JS (Advanced)
Manually load MathJax in Elementor:
- Add this code to your theme’s functions.php or a custom plugin:
Code:
add_action('wp_head', function(){echo '<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>';
echo '<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>';
});
- In Elementor’s Text Editor, write LaTeX using \(...\) for inline or \[...\] for block equations.
Troubleshooting
- Clear all caches (plugin, browser, CDN).
- Ensure your LaTeX syntax is correct (e.g., no missing $ or \).
- Test with a default WordPress theme (e.g., Twenty Twenty-Four) to rule out theme conflicts.
If none of these work, consider reaching out to WP QuickLaTeX’s support team for Elementor compatibility guidance. You can also explore alternatives like
KaTeX for faster rendering.
Let me know if you need further help!