Shortcodes are a convenient way to add reusable content and functionality to your site without having to write custom code. This guide will walk you through the basics of using shortcodes on our platform.
Basic Usage
To use a shortcode, simply insert it into your content like this:
[shortcode_name parameter1=value1 parameter2=value2]
Common Shortcodes
Here are some common shortcodes you might use:
[button]
- Usage:
[button url="https://www.yourwebsite.com" text="Click Me"]
- This creates a clickable button with custom text and a link.
- Usage:
[image]
- Usage:
[image src="https://www.yourimage.com" alt="Image description"]
- This inserts an image with custom alt text.
- Usage:
[quote]
- Usage:
[quote author="Author Name" source="Source"]
- This creates a styled quote block with an author and source.
- Usage:
Advanced Shortcodes
For more advanced functionality, you can use shortcodes that accept multiple parameters and even nested content:
- [code]
- Usage:
[code language="python"] print("Hello, World!") [/code]
- This allows you to embed code snippets with syntax highlighting.
- Usage:
Additional Resources
For more information on shortcodes and their usage, please visit our Shortcodes Documentation.
Syntax Highlighting Example