The Feast Hooks allows you to add content at key locations in a theme, similar to Reusable Blocks.
Jump to:
Purpose
This is intended to make it possible to automatically insert content specific to certain posts, only on certain posts.
Include category
If specified, the hook will only run on posts within this category, and nowhere else.
You must use either Include category or Exclude Category, but not at the same time.
Exclude category
If specified, the hook will run on all posts, except posts assigned to this category.
You must use either Include category or Exclude Category, but not at the same time.
Include post
If specified, the hook will only run on these posts, and nowhere else.
You must use either Include post or Exclude post, but not at the same time.
Exclude post
If specified, the hook will run on all posts, except the posts specified.
You must use either Include post or Exclude post, but not at the same time.
Priority
The default priority on hooks is 10.
Setting a priority below 10 will display content above actions registered on 10
Setting a priority above 10 will display content below actions registered on 10.
Issues
There are several issues to be aware of that can negatively impact a site:
- caching - content that only shows up on certain pages may be susceptible to incomplete caching
- pagespeed - adding DOM nodes to already-bloated pages will negatively impact pagespeed
- CLS - content added above the fold may cause significant CLS if not coded properly
- headings - proper site heading structure should be followed, and awareness of context and accessibility guidelines are required
- formatting - improperly closing HTML tags can lead to a broken webpage layout
Support
We're unable to provide support for issues relating to the hooks as part of the Feast Plugin, because of how complex and time consuming this would be. The majority of sites should not have any need for this.
Hooks are a developer-level feature that require in-depth knowledge of WordPress, coding, and the framework. These are here primarily for convenience for developers who know what they're doing.
Any sort of support would be more of a mentor-style consultation service rather than basic troubleshooting. We can offer developer-level support for $7,500/year. Please contact us directly for details.
?show_hooks
You can append the ?show_hooks query to any page while logged in to see available hook locations.
Frameworks
You can find references to specific framework hooks at:
Leave a Reply