Linux 软件免费装
Banner图

FSM Custom Featured Image Caption

开发者 fesomia
更新时间 2025年1月8日 19:45
捐献地址: 去捐款
PHP版本: 4 及以上
WordPress版本: 6.8
版权: GPLv2 or later
版权网址: 版权信息

标签

images featured image copyright credits caption

下载

1.16 1.0 1.21 1.24 1.25 1.12 1.13 1.14 1.15 1.17 1.18 1.19 1.20 1.01 1.10 1.11 1.22 1.23

详情介绍:

This plugin allows adding custom captions to the featured images of the posts. It works with both Gutenberg and the classic editor. That's how it works: The plugin also allows to: For maintaining a semantic code, this plugin writes the caption in a <figcaption> label. New in version 1.21: Compatibility with Divi themes. This is an experimental feature to allow the plugin to work with Divi, as many users requested. Note that it may not work for all layouts, and that since it replaces the function divi uses to show featured images, when enabled it may potentially cause problems with older versions of Divi or if the core theme is updated. As always, it may also be necessary to add custom css to your theme to show the captions the way you want Format The caption will adopt the format specified for the <figcaption> element and the wp-caption-text CSS class, which is common in WordPress themes. Usage The plugin works out of the box. To start using it, all you need to do is activate it and play with the new options in your edit page. For advanced users, you will found a special settings page for fine-tuning some details. Go to Settings > FSM Custom Featured Image Caption to set up the CSS and HTML parameters: Shortcode We’ve added a shortcode that allows you to put the featured image (and it’s caption) in your page. Just write [FSM_featured_image] anywhere in the content edit box of your post or page to display it. You can also select the size of the image with the parameter "size". Note that defined image sizes may differ between WordPress themes. The defaults are these: thumbnail, medium, medium_large, large and full. By using the shortcode, the plugin will try to remove the featured image from your theme’s default position to prevent it from appearing twice. Anyway, this is as this is an experimental feature and results may fluctuate. It also will not appear in lists. Note that the usage of the shortcode is not related to the "Allow shortcodes" option in the settings page. Usage example: [FSM_featured_image size=thumb] For developers The plugin comes with two public functions that allow you to get or output the featured image caption of the current post anywhere in your template. Once the plugin is activated, use <?php get_FSM_featured_image_caption()?> to return a string containing the text that you can assign to a variable or <?php the_FSM_featured_image_caption()?> where you like the caption be displayed. Both functions accept parameters passed inside an array with the following keys: Usage example: php the_FSM_featured_image_caption( array('tag' => 'p', 'class' => 'class1 class2', 'style' => 'color: red;', 'allow_html'=> true, 'allow_shortcodes'=>true ); Translations The plugin comes up with three complete translations: You can contribute to translating it into more languages at https://translate.wordpress.org/projects/wp-plugins/fsm-custom-featured-image-caption/ Coming soon

安装:

Automatic installation Log in to your WordPress dashboard, navigate to the Plugins menu, and click "Add New". In the search field type "FSM Custom Featured Image Caption", then click "Search Plugins". Once youve found it, click "Install Now". That's all. Manual installation
  1. Upload fsm-custom-featured-image-caption to the /wp-content/plugins/ directory.
  2. Activate the plugin through the "Plugins" menu in WordPress.
  3. Use the plugin in the edit post page.

屏幕截图:

  • Plugin in the Post editing page.

更新日志:

1.25 1.24 1.23 1.22 1.21 1.20 1.19 1.18 1.17 1.16 1.15 1.14 1.13 1.12 1.11 1.10 1.01 1.0