The DigiFusion Site Builder includes a powerful hooks system that allows you to insert custom content at specific locations throughout your website. This feature is available in DigiFusion Pro and provides precise control over where your custom elements appear.
Understanding Hooks
Hooks are predefined insertion points in your theme where you can inject custom content. Unlike other builder types that replace entire sections, hooks allow you to add content to specific locations without disrupting the existing theme structure.
Creating a Hook-Based Builder
Navigate to your WordPress admin and go to DigiFusion > Site Builder.
Click Add New to create a new builder element.
Enter a descriptive title for your hook-based content.
In the Builder Settings panel on the right, select Hooks from the Builder Type dropdown.
Selecting a Hook Location
Once you’ve selected the Hooks builder type, you’ll see a Hook Name dropdown containing all available hook locations.
The hooks are organized by website areas:
Header Hooks:
- Before Header
- Before Header Container
- Before Header Inner
- Before Header Logo
- Before Header Nav
- After Header Menu Links
- After Header
Content Area Hooks:
- Before Main Content
- Before Main Container
- After Main Container
- After Main Content
Footer Hooks:
- Before Footer
- Before Footer Container
- Before Footer Widgets
- After Footer Widgets
- After Footer Copyright
- After Footer
Post and Archive Hooks:
- Before Posts Grid
- After Posts Grid
- Before Single Post
- After Single Post Meta
- Before Related Posts
- After Related Posts
WordPress Core Hooks:
- WP Head (in
<head>
section) - WP Footer (before
</body>
)
Select the hook location where you want your content to appear.
Setting Display Rules
Configure where your hook content should appear using the Display Rules section.
Choose Entire Site to show the content on all pages, or select Specific Pages to define custom rules.
For specific pages, you can include or exclude:
- Individual pages or posts
- Post types (posts, pages, custom post types)
- Taxonomies (categories, tags)
- Archive pages
- Special pages (homepage, search results, 404 page)
Building Your Hook Content
Use the content editor to create your hook content. You can add:
- Text and rich content
- Images and media
- Custom HTML/CSS
- Contact forms
- Social media elements
- Any other content blocks
The content will automatically appear at your selected hook location on the pages that match your display rules.
Managing Multiple Hook Builders
You can create multiple hook builders for different locations and purposes. Each hook builder operates independently, allowing you to:
- Add different content to various hook locations
- Use different display rules for each hook
- Combine multiple hooks on the same page
Hook Priority and Conflicts
If multiple hook builders target the same hook location with overlapping display rules, they will all execute. The content will appear in the order the builders were created.
To avoid conflicts, ensure your display rules are specific enough to target only the intended pages.
Common Hook Use Cases
Header Enhancements: Use header hooks to add announcement bars, contact information, or social media links above or below your main navigation.
Content Injection: Add newsletter signup forms, advertisements, or custom CTAs before or after your main content areas.
Footer Additions: Insert additional footer content like disclaimers, certifications, or extra navigation elements.
Post Enhancements: Add author bios, related content sections, or social sharing buttons to your blog posts.
The hooks system provides maximum flexibility for customizing your website layout without modifying theme files directly.