WP Manifestindependent plugin directory
manifest / unclassified / readmore-shortcode

PhilDesigns Lightweight Readmore Shortcode

Wrap any visual editor content in [readmore] to collapse/expand it with "Read More" / "Close" links. Supports multiple instances per page.

by PhilDesigns · github.com/phil-designs/readmore-shortcode · website

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/phil-designs/readmore-shortcode/archive/refs/heads/main.zip

Wrap any content in [readmore] to collapse and expand it with animated "Read More" and "Close" links. Supports multiple instances per page.

Tags: readmore, shortcode, expand, collapse, content Requires at least: 6.7 Tested up to: 7.0 Requires PHP: 7.4 License: GPL-2.0-or-later


Description

Lightweight Readmore Shortcode collapses long blocks of content to a set height and reveals the rest when the visitor clicks "Read More". Clicking again collapses it back. All shortcode attributes are optional.

Usage

Basic:

[readmore]Your long content here...[/readmore]

With options:

[readmore collapsed_height="300" more_text="Show more" less_text="Show less" speed="300"]
...content...
[/readmore]

Shortcode Attributes

All attributes are optional.

Attribute Default Description
collapsed_height 80 Height in px when collapsed
speed 100 Toggle animation speed in ms
more_text Read More Label for the expand link
less_text Close Label for the collapse link
start_open false Start in the expanded state (true / false)
height_margin 0 Extra px tolerance before truncation kicks in

Website

https://phildesigns.com


Installation

  1. Upload the readmore-shortcode folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins menu in WordPress
  3. Wrap any content with [readmore]...[/readmore]

Changelog

1.0.0

  • Initial release