Title: BF Modal
Author: Bornfight
Published: <strong>2021 年 11 月 6 日</strong>
Last modified: 2023 年 4 月 20 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/bf-modal.svg)

# BF Modal

 作者：[Bornfight](https://profiles.wordpress.org/bornfight/)

[下载](https://downloads.wordpress.org/plugin/bf-modal.1.1.3.zip)

 * [详情](https://cn.wordpress.org/plugins/bf-modal/#description)
 * [评价](https://cn.wordpress.org/plugins/bf-modal/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/bf-modal/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/bf-modal/#developers)

 [支持](https://wordpress.org/support/plugin/bf-modal/)

## 描述

BF Modal is made to convert any custom post type, page or post to modal. Plugin

automatically adds rewrite rules so you can still have nice and relevant URL when
popup is opened. Take full control of modal and override modal templates. You can
create custom modal templates so each page can have different template. You can 
also override based on post type.

## 屏幕截图

 * [[
 * The BF Modal Options Page
 * [[
 * Modal Options for pages

## 安装

Upload ‘bf-modal’ to the ‘/wp-content/plugins/’ directory

Activate the plugin through the ‘Plugins’ menu in WordPress

Convert pages and post types to modal

#### How this plugin works

 1. Simply go to BF Modal Options page and choose post type you want to convert to 
    modal
 2. Choose an archive page, page that will be displayed below this popup
 3. Go to Settings -> Permalinks and save permalinks so rewrite rules can be rewritten
 4. That’s it, you are good to go, post type single page will open in modal when you
    visit URL

If you add links to modal pages somewhere it will go to that link and open popup/
modal, but if you
 want to stay on the same page and not actually go to different
page then you can use

To your link you add class **js-bfml-modal-trigger** and post-data-id attribute 
with post id

Example:

    ```
    <a href="#" class="js-bfml-modal-trigger" data-post-data-id="12">
        This is a test post type Link
    </a>
    ```

If you want to convert pages to modal
 1. Go to page you want to convert, find Modal
Page options meta box 2. Set Is Modal to true and set your archive page 3. Settings-
> Permalinks and save permalinks 4. Open your page and it will open as modal

## 常见问题

### What kind of support do you provide?

Please post your question on plugin support forum

## 评价

此插件暂无评价。

## 贡献者及开发者

「BF Modal」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Bornfight ](https://profiles.wordpress.org/bornfight/)
 *   [ jmucak ](https://profiles.wordpress.org/jmucak/)

[帮助将「BF Modal」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/bf-modal)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/bf-modal/)，查看[SVN仓库](https://plugins.svn.wordpress.org/bf-modal/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/bf-modal/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/bf-modal/)。

## 更新日志

#### 1.0.11

_Release Date – 27 October 2021_
 First Release

#### 1.1.0

_Release Date – 06 December 2021_

 * New – added remove options on uninstall plugin
 * New – added flush rewrite rules when setting rewrite rules
 * New – added link to settings page

#### 1.1.1

_Release Date – 07 December 2021_

 * Fix – updated npm packages
 * Fix – updated saving post types options
 * Update – refactored code

#### 1.1.2

_Release Date – 07 March 2023_

*Fix – Modal admin page settings

#### 1.1.3

_Release Date – 20 April 2023_

*Fix – Modal scroll on mobile
 *Test – new WP version

## 额外信息

 *  版本 **1.1.3**
 *  最后更新：**3 年前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 4.7 或更高版本 **
 *  已测试的最高版本为 **6.2.9**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/bf-modal/)
 * 标签
 * [custom popup](https://cn.wordpress.org/plugins/tags/custom-popup/)[modal](https://cn.wordpress.org/plugins/tags/modal/)
   [popup](https://cn.wordpress.org/plugins/tags/popup/)
 *  [高级视图](https://cn.wordpress.org/plugins/bf-modal/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/bf-modal/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/bf-modal/reviews/)

## 贡献者

 *   [ Bornfight ](https://profiles.wordpress.org/bornfight/)
 *   [ jmucak ](https://profiles.wordpress.org/jmucak/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/bf-modal/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://cn.wordpress.org/?output_format=md)