A lightweight WordPress plugin that adds a shortcode to open content in a Bootstrap 5 modal window. Version 1.3.1.
Inline modal
[mf_modal label="Open modal" title="My Title"]
Your modal content here.
[/mf_modal]
Iframe modal
[mf_modal_iframe label="Open page" title="Page Title" url="https://example.com"]
Shortcode attributes
| Attribute | Default | Description |
|---|---|---|
label | Open | Text shown on the trigger button |
title | (empty) | Optional modal header title |
button_class | btn btn-link | CSS class for the trigger (plain link by default) |
close_class | mf-modal-close | CSS class for the close button (plain × by default) |
modal_width | modal-lg | Bootstrap modal size: modal-sm, modal-lg, modal-xl |
url | (empty) | URL to load in iframe (mf_modal_iframe only) |
Download
Source code: github.com/umlouco/mfmodalwindow
