weeblrAMP Advanced customization
This section is going to cover the more advanced ways of customizing your AMP pages, starting from the built-in output of weeblrAMP. As mentioned before, besides point-and-click customization done in the control panel (which can already take you pretty far), there are 3 more ways to customize your content:
- Shortcodes: codes to include in your content
- Hooks (actions and filters): to programmatically alter weeblrAMP operation
- Templates overrides in theme or child theme: to alter AMP page HTML layout or output
Shortcodes are a standard feature of WordPress, which lets you put small codes in your content, which WordPress will later replace with something. For instance, the
gallery short code will cause WordPress to display all the images found on a page as an image gallery.
weeblrAMP adds a number of shortcodes specific to AMP pages. Please find them all on this page.
Hooks (actions and filters)
When you need complete control over the output of your AMP page, you can entirely replace (or copy and then modify) weeblrAMP themes parts. Our standard theme is broken down in many small parts, and you can override only those that you need for your purpose.
You can do that by adding PHP files in specific locations in your theme, or better inside a child theme. Those "overrides" will be picked up by weeblrAMP and used instead of the built-in ones.
Please see more practical details about templates overrides on this page.