Code Display
The Code Display shortcode for WordPress can be used to display any kind of code inside a container. By default, WordPress will alter or execute code inserted in posts or pages content. Our Code Display can be used to wrap the code desired to showcase, not execute. Check below for example implementations and shortcode documentation:
Code Display Examples
PHP / HTML Code
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!";
?>
</body>
</html>
Code Display Shortcodes
Code Display Shortcode
[ x3m-code title="PHP / HTML Code" copy="Copy"] any HTML, PHP, Javascript.. codes in here [ /x3m-code]Code Display Documentation
Here are the shortcode option settings available for Code Display:
| Shortcode Settings | Details |
|---|---|
| title=”PHP code” | This is used to set the title of the Code Display container. |
| copy=”Copy” | This is used to set the name of the Copy button (ideal for other languages). The copy button will simply select & copy entire code inside the container. |