Wueen

Description

Sometimes, you need to use the same content across multiple posts as shared content. This shared content can save time, but the usual method of copying and pasting isn’t ideal. Here’s why:
– Editing is a hassle. If the content is copied across several posts, making updates becomes time-consuming and frustrating.
– Post size gets bloated. If the shared content is lengthy and used in multiple posts, it can unnecessarily increase your database size.

That’s where the Wueen plugin steps in to save the day!
With a simple shortcode and the wueen-blocket custom post type, you can streamline this process. Here’s how it works:
1- Create your shared content as a wueen-blocket post.
2- Use the shortcode, which includes the content’s unique ID, to insert it into any post, page, or widget.

Now for the cool part: You can make your content dynamic with variables!
Add key-value pairs to your wueen-blocket post, and use them inside curly braces { } within the text. When the shortcode is used, these variables will automatically be replaced with their values. And here’s the cherry on top: You can override these values directly in the shortcode to make the content even more adaptable!

With Wueen, managing shared content has never been easier—or more flexible. 😊

Features

Custom Post Type wueen-blocket: Easily create and manage shared content.
Variable Definition: Add key-value variables to your wueen-blocket posts and use them directly within the content.
Shortcode Support: Insert content from any wueen-blocket post anywhere using its unique ID (post ID).
Dynamic Variables: Override variables directly through the shortcode for added flexibility.
Nested Shared Content: The ability to use any shortcodes within contents.

Usage

  1. Create a New Wueen Blocket
    – From the admin dashboard menu, navigate to Wueen Blockets and click on Add New Blocket.
    – Enter a title and your content. Note: The title is for organizational purposes only and won’t appear on the front end.

  2. Define Variables (Optional)
    – If your content includes repetitive or dynamic values, you can define them using the Wueen Blocket Variables metabox.
    – Use lowercase letters for variable names and replace spaces with hyphens (-).
    – In your content, wrap the variable names in curly braces { }.
    For example, if your variable name is version include {version} in your content to dynamically replace it.

  3. Copy the Shortcode:
    You’ll find the shortcode under the Publish metabox. It looks like this:
    [wueen-blocket id=”POST_ID”][/wueen-blocket]
    Copy and use the shortcode wherever needed.

Shortcode Structure

The id attribute is required, while additional attributes can customize functionality:
content-position: Accepts after or before. Default value is after. It determines whether the content inside the shortcode tags should appear before or after the content specified by the ID.
shortcode: Accepts on or off. Default value is on. It controls whether any shortcodes within the shared content are executed.
err-404: Specifies the error message if the ID is not found. Default: “Wueen Blocket {id} not found”.
Custom attributes starting with v-: Override variable values. For example, v-version can set a new value for the version variable.

Screenshots

  • Wueen Blocket Post Type
  • Wueen Blocket Variable
  • Wueen Blocket Shortcode
  • Wueen Blocket Usage

Installation

  1. Go to Plugins > Add New.
  2. Under Search, type Wueen
  3. Find Wueen & click Install Now to install it
  4. If successful, click Activate Plugin to activate it & you are ready to go.

FAQ

Does the post status matter?

The content will only be displayed if the post is published, unless the force-display attribute is set to on.

Is it possible to use the ID of post types other than `wueen-blocket` in the shortcode?

You can use the ID of any post type in the shortcode to display its content, but variables are only available in wueen-blocket.

Does Wueen have a settings page?

Currently, there is no need for a settings page.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Wueen” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Wueen” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

0.2.0

Initial release