WP Manifestindependent plugin directory
manifest / developer / shortcode-plugin

Shortcode Plugin

A simple WordPress plugin to demonstrate shortcode functionality.

by Kishan Vyas · github.com/kishanvyas308/shortcode-plugin

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/kishanvyas308/shortcode-plugin/archive/refs/heads/master.zip

A simple WordPress plugin to demonstrate shortcode functionality.

Overview

Shortcode Plugin is a lightweight WordPress plugin created for demonstrating how to build and use shortcodes. It provides two example shortcodes: one for displaying employee information with customizable attributes, and another for listing recent posts dynamically using WP_Query.


Features

  • Register custom shortcodes for WordPress.
  • Display employee information with customizable name and email.
  • List a configurable number of recent posts.
  • Clean and simple code for learning or quick use.

Installation

  1. Download or clone this repository:
    git clone https://github.com/KishanVyas308/Shortcode-Plugin.git
  2. Upload the shortcode-plugin.php file to your /wp-content/plugins/ directory.
  3. Go to your WordPress admin dashboard, then Plugins > Installed Plugins.
  4. Activate Shortcode Plugin.

Usage

Employee Shortcode

Displays a styled box with employee name and email.

Shortcode: [employee name="John Doe" email="john.doe@example.com"]

Parameters:

  • name (optional): Defaults to "Kishan Vyas"
  • email (optional): Defaults to "kishan.vyas@example.com"

Example Output:

[employee name="Jane Smith" email="jane.smith@example.com"]

List All Posts Shortcode

Displays a list of recent published posts.

Shortcode: [list-all-posts number="5"]

Parameters:

  • number (optional): Number of posts to display (default: 4)

Example Output:

[list-all-posts number="3"]

Customization

You can modify the plugin code to add more attributes, change the layout, or register additional shortcodes.


Screenshots

image

image

image

image

image


Credits

Developed by Kishan Vyas


License

This project is licensed under the MIT License.