WordPress.org

Ready to get started?Download WordPress

Forums

Reusable Content/Text Snippets (3 posts)

  1. rardnek
    Member
    Posted 3 years ago #

    I would LOVE if WP supported the concept of reusable content that I can insert into my posts ala a signature at the end of emails. Maybe this already exists, but I've been looking and can't find anything except similar queries that are 4-5 years old.

    When writing certain posts, I type up the same snippet of text every time, and would love if I could create a snippet of reusuable html that I could incorporate via shortcode.

    I saw previous post (several years old) that mentioned this concept, calling it a "bit", but I couldn't see any evidence that something like this has been developed.

    does anyone else see this as useful, or are there plugins that address this?

    Tx,

    kendra

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    You could create some custom shortcodes:

    // [my-shortcode sig="custom-content"]
    function my_shortcode_handler( $atts ) {
    	extract( shortcode_atts( array(
    		'sig' => 'Mary Smith',
    	), $atts ) );
    }
    add_shortcode( 'my-shortcode', 'my_shortcode_handler' );

    http://codex.wordpress.org/Shortcode_API

  3. Mary B.
    Member
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic