Skip to content

Conversation

@RabbiIslamRony
Copy link
Member

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

Before
https://imgur.com/ZyUlCn0
After
https://imgur.com/ZY8J8fZ

Problem

When Directorist components (all-authors, author-contents, and sidebar-archive-contents) are used within page builders (Elementor, Gutenberg, etc.), the hardcoded directorist-container class applies max-width constraints that conflict with the builder's layout system. This prevents proper container control from the builder side.

Solution

Changed container classes from directorist-container to directorist-container-fluid in three template files:

  • templates/all-authors.php (line 16)
  • templates/author-contents.php (line 15)
  • templates/sidebar-archive-contents.php (line 13)

Technical Details

Why container-fluid?

  • directorist-container applies responsive max-widths (540px → 1320px) that interfere with builder layouts
  • directorist-container-fluid uses width: 100% with no max-width, allowing full builder control
  • Both helper functions (directorist_container() and directorist_container_fluid()) support filters for builder overrides, but container-fluid is the appropriate default for embedded components

Consistency

This change aligns with existing patterns:

  • templates/single-contents.php already uses Helper::directorist_container_fluid()
  • templates/dashboard-contents.php already uses Helper::directorist_container_fluid()

Builder Integration

Page builders typically wrap components in their own container elements. By using container-fluid, we:

  1. Allow builders to control container width through their wrapper
  2. Prevent double-container issues (plugin container + builder container)
  3. Maintain flexibility for different builder layout modes

Testing

  • Verified components render correctly in standalone mode
  • Verified components work within page builder layouts
  • Confirmed no visual regressions in existing implementations

Impact

  • Breaking: None (container-fluid is more flexible)
  • Compatibility: Improved builder integration
  • Visual: No changes when used standalone; improved when used in builders

Any linked issues

Fixes #

Checklist

@RabbiIslamRony RabbiIslamRony self-assigned this Dec 31, 2025
@RabbiIslamRony RabbiIslamRony added this to the v8.5.9 milestone Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant