Skip to content

A WordPress plugin that adds a 'With Caption' style to the Featured Image block

License

Notifications You must be signed in to change notification settings

thomasguillot/simple-featured-image-caption

Repository files navigation

Simple Featured Image Caption

A WordPress plugin that adds a "With Caption" style to the Featured Image block, allowing you to display the image caption below the featured image.

Description

This plugin extends the WordPress Featured Image block by adding a new style option that displays the image caption below the featured image. It's perfect for photographers, bloggers, and content creators who want to add context to their featured images.

Features

  • Adds a "With Caption" style to the Featured Image block
  • Automatically displays the image caption from the Media Library
  • Maintains WordPress native caption styling
  • Lightweight and simple to use

Installation

  1. Download the latest release from the Releases page
  2. Upload the plugin files to the /wp-content/plugins/simple-featured-image-caption directory, or install the plugin through the WordPress plugins screen directly
  3. Activate the plugin through the 'Plugins' screen in WordPress

Usage

  1. Edit a post or page
  2. Add a Featured Image block
  3. In the block settings sidebar, select the "With Caption" style
  4. The image caption will automatically appear below the featured image

Development

Prerequisites

  • Node.js (v14 or higher)
  • npm (v6 or higher)

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/simple-featured-image-caption.git
    cd simple-featured-image-caption
  2. Install dependencies:

    npm install
  3. Start development:

    npm start

Building

To build the plugin for production:

npm run build

Creating a Release

To create a new release:

npm run release

This will:

  1. Build the assets
  2. Create a zip file in the root directory

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the GPL-2.0-or-later License - see the LICENSE file for details.

Credits

Created by Thomas Guillot

About

A WordPress plugin that adds a 'With Caption' style to the Featured Image block

Resources

License

Stars

Watchers

Forks

Packages

No packages published