Skip to content

A tiny plugin that adds a shortcode to output the excerpt anywhere in a post.

Notifications You must be signed in to change notification settings

Frique/wp-plugin-showexcerpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

WP Plugin: Show Excerpt

Extremely basic plugin to add an [excerpt] shortcode that will print out the Excerpt (if it exists), wrapped in a predefined tag. Also has a button in the admin text editor (HTML tab). Also adds a class "except" to the tag.

This will prevent repetition (copy part of an article to the excerpt box and vice versa) and allows to define default styling around your excerpt without letting the theme load it in a default location. Think [article intro], [excerpt], [article continued].

Available options (shortcode attributes) are:

  • tag: p, span, em etc. The default is "p".
  • styled: usable when you sometimes want to style the block differently and sometimes as regular text. Adds the class "excerpt--styled" when true (the class "excerpt" is always added). The default is true.
  • class: To provide additional CSS classes (separated by space). The default is empty.

Example 1: [excerpt]
Example 2: [excerpt tag="span" styled="0" class="additional css classes"]

About

A tiny plugin that adds a shortcode to output the excerpt anywhere in a post.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages