Shortcake

Description

Used alongside add_shortcode, Shortcake supplies a user-friendly interface for adding a shortcode to a post, and viewing and editing it from within the content editor.

Once you’ve installed the plugin, you’ll need to register UI for your shortcodes. For inspiration, check out examples of Shortcake in the wild.

To report bugs or feature requests, please use Github issues.

Installation

Shortcake can be installed like any other WordPress plugin.

Once you’ve done so, you’ll need to register the UI for your code.

Screenshots

1. Without Shortcake, shortcodes have a minimal UI.

687474703a2f2f732e776f726470726573732e6f72672f657874656e642f706c7567696e732f73686f7274636f64652d75692f73637265656e73686f742d312e706e67

2. But with Shortcake, TinyMCE will render the shortcode in a TinyMCE view.

687474703a2f2f732e776f726470726573732e6f72672f657874656e642f706c7567696e732f73686f7274636f64652d75692f73637265656e73686f742d322e706e67

3. And add a user-friendly UI to edit shortcode content and attributes.

687474703a2f2f732e776f726470726573732e6f72672f657874656e642f706c7567696e732f73686f7274636f64652d75692f73637265656e73686f742d332e706e67

4. Add new shortcodes to your post through “Add Media”.

687474703a2f2f732e776f726470726573732e6f72672f657874656e642f706c7567696e732f73686f7274636f64652d75692f73637265656e73686f742d342e706e67

Simply Show Ids

Some users note that on the edit posts, pages, media, links, categories, tags and users pages, there is no easy way to see the ID of the specific item you’re working with. When activated, Simply Show Ids shows the ID of Posts, Pages, Media, Links, Categories, Tags and Users in the admin tables for easy access.

MostPopular Feed

MostPopular Feed allows you to create an RSS feed of the most popular posts on your site. It uses the statistics gathered and hosted on WordPress.com to determine which posts are the most frequently viewed, and then returns an RSS2 feed of those posts at yoursite.com/?feed=mostpopular

The feed’s output can be altered through query string variables:

  • Use includepages=1 to include pages in addition to posts (default: off)
  • Use limit=10 to control how many results to include (default: 10, max: 100)
  • Use duration=90 to specify how many days in the past you want to use statistics for in determining top posts (default: 90, max: 90)

To use the plugin, activate it in the VIP Plugins area of your Dashboard.

AngelList

What does this plugin do?

The plugin allows you to associate an individual post with one or more AngelList companies to automatically display the company logo, summary, description, key people, and more after your post content.

How do I set it up?

After activating the plugin, you’ll see a new “AngelList companies” module in your edit post screen:

Add company

When you choose a company, that company’s AngelList profile will display below your blog post:

Profile

For more information, please see the full plugin documentation here.

What features does the plugin offer?

  • The plugin generates HTML markup for posts with associated companies. Company profiles are cached on your server for fast access without remote requests to AngelList servers with each page load.
  • The plugin includes Schema.org markup for rich company metadata and search engine friendliness.

WordPress.com VIP Search Add-On

Improve the relevance and quality of your search results with the WordPress.com VIP search add-on powered by Elasticsearch technology.

Configuration is as simple as activating the plugin. With an index configured, your search results will be automatically filtered to deliver ElasticSearch goodness.

Define facets and add the sidebar widget so viewers can easily narrow down to the exact result they want. Here’s an example of the facets powering this site’s search:

// Sets ElasticSearch facets
add_action( 'after_setup_theme', function() {

	if ( ! function_exists( 'WPCOM_elasticsearch' ) )
		return;

	WPCOM_elasticsearch()->set_facets( array(
		'Content Type' => array(
			'type'     => 'post_type',
			'count'    => 10,
		),
		'Categories' => array(
			'type'     => 'taxonomy',
			'taxonomy' => 'category',
			'count'    => 10,
		),
		'Tags' => array(
			'type'     => 'taxonomy',
			'taxonomy' => 'post_tag',
			'count'    => 10,
		),
		'Year' => array(
			'type'     => 'date_histogram',
			'field'    => 'post_date',
			'interval' => 'year',
			'count'    => 10,
		),
		'Month' => array(
			'type'     => 'date_histogram',
			'field'    => 'post_date',
			'interval' => 'month',
			'count'    => 10,
		),
	) );
});

Taxonomy Images

What does this plugin do?

This plugin allows you to associate a specific image with a given category, tag, or custom taxonomy.

How do I set it up?

After activating the plugin, go to Settings→Taxonomy Images in your Dashboard’s sidebar menu and select the taxonomies you want to use images for:

Choose taxonomies

Then, go to Posts→Categories and/or Posts→Tags and assign images:

Pick image

You can upload a new image or choose one from your Media Library.

Associate

For more information, including how to use filters to display these images in your theme, please see the full plugin documentation here.

WordPress.com Related Posts

If your VIP site utilizes the WordPress.com Related Posts plugin, we have a few changes for you that we expect to improve the performance of Related Posts.

We’ve deprecated the WordPress.com Related Posts plugin and are focusing our efforts on the Jetpack Related Posts plugin, which is now built into WordPress.com.

What does this mean for you? Read all of the details in this Lobby post and this documentation page on related posts.

Taxonomy List Widget

What does this plugin do?

The plugin creates a list of non-hierarchical taxonomies and displays it in your sidebar or footer, as an alternative to the tag cloud.

How do I set it up?

After activating the plugin, go to Appearance→Widgets and drag the Taxonomy List Widget into your sidebar or footer. Choose your settings and save:

Settings

And check out your new widget:

Tags

For more information, please see the full plugin documentation here.

What features does the plugin offer?

  • Creates lists of non-hierarchical taxonomies (such as post tags) as an alternative to term (tag) clouds.
  • Multiple widgets can be used, each with its own set of options.
  • Numerous formatting options are provided, including maximum numbers of terms, term order, truncating of term names, and more.
  • List styles are fully customizable, with built-in support for bulleted lists and numbered lists.
  • Using the taxonomy_list_widget function, users can generate lists for use outside of the included widget.

This plugin was formerly known as the Tag List Widget. It was completely rewritten for version 1.0.

View All Posts Pages

What does this plugin do?

The plugin adds a “View All” option to any paginated post.

How do I set it up?

After activating the plugin, go to Settings→View All Post’s Pages in your Dashboard’s sidebar menu. There, choose the settings you’d like:

View All Posts Settings

After you save those changes, each post that’s divided into multiple pages using the NextPage Pagination  will have a “View All” link:

View All Link

For more information, please see the full plugin documentation here.

What features does the plugin offer?

The plugin allows you to customize the link text, display it before or after the post or both,  set the CSS class(es) for it, and select whether the link should be shown on posts, pages, custom CSS, etc.

Lazy Load

Lazy load images to improve page load times. Uses jQuery.sonar to only load an image when it’s visible in the viewport.

This plugin is an amalgamation of code written by the WordPress.com VIP team at Automattic, the TechCrunch 2011 Redesign team, and Jake Goldman (10up LLC).

Uses jQuery.sonar by Dave Artz (AOL).

Formategory

What does this plugin do?

Formategory allows you to customize posts based on their categories. Just define a template for a category, and all of the posts in that category will be displayed according to the template.

How do I set it up?

Once you activate the plugin, you’ll see you have a new Category Templates option in your Dashboard’s sidebar menu:

Category Menu

There, you can add a new Category Template:

Create template

Use the buttons in the Template Placeholders module to insert placeholders for the post’s content: {{ the_content }} will be replaced by the post’s content, and {{ the_title }} will be replaced by the post’s title. Define your styles in the window, and then select one or more categories for the template.

After you save it, any posts in those categories will be instantly templated:

Review

For more information, please see the full plugin documentation here.

What features does the plugin offer?

  • The Category Templates area of your Dashboard allows you to manage your templates just like you manage your posts and pages.
  • Quickly apply and remove templates, to one or more categories of posts.
  • Easily make formatting and style changes to all posts in a category simply by editing the template.

External Links in a New Window

What does this plugin do?

The plugin causes all external links on the front-end of your blog to open in a new window automatically, so that you don’t have to choose the target for each link as you add them.

How do I set it up?

Once you’ve activated the plugin, it will work automatically.

Category Posts Widget

What does this plugin do?

This widget will display a specified number of posts from a single category. We run a slightly modified version that improves performance.

How do I set it up?

Once you’ve activated the widget, you’ll see it listed in Appearance→Widgets. 

What features does the plugin offer?

The widget includes options for displaying either a list of posts:

List of Posts

Or post excerpts:

Excerpts

You also have the option of linking the widget title to the category archive page.

WP-Paginate

WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.

Breadcrumb NavXT

Creates a breadcrumb list for Pages. It lists the current Page and all of it’s ancestors allowing for easier navigation to parent Pages.

WP Pagenavi

Want to replace the old ← Older posts | Newer posts → links with some page links?

This plugin provides the wp_pagenavi() template tag which generates fancy pagination links.

WP.com Geo Uniques

Usage: Simple Mode

If you just need to know which country the user is visiting from, Simple Mode (which is the default) is all you need. Simply register the countries you want to support and a default (if desired). wpcom_geo_get_user_location() will return the user’s country value via a corresponding two-letter code (e.g. “us”, “ca”, etc.)

wpcom_vip_load_plugin( 'wpcom-geo-uniques' );
// Set default and other supported countries
wpcom_geo_set_default_location( 'us' );
wpcom_geo_add_location( 'ca' );

$country = wpcom_geo_get_user_location();
if ( 'ca' === $country ) {
    echo "Canadian, eh?";
} else {
    echo "USA! USA!"; // 'us' is set to the default
}

Usage: Advanced Mode

By default, geo-location happens at a country-level but this can be extended to cities and states in advanced mode. Please note that there is an added performance cost to this approach and should be considered after close consultation with the VIP team.

This requires three pieces:

  • enabling advanced mode
  • defining your location groups
  • writing some js that handles group assignment based on the user’s geolocation data

In your theme:

// Explicitly enable advanced mode
add_filter( 'wpcom_geo_simple_mode', '__return_false', 999 );

// Return the region value for use in the cache key
wpcom_geo_add_location( 'san-francisco' );
wpcom_geo_set_default_location( 'national' );

// This is the URL to the js file where we will handle our location assignment
add_filter( 'wpcom_geo_client_js_src', function( $url ) {
    return get_template_directory_uri() . '/js/geo.js';
} );

In the JS file:

wpcom_geo.set_detect_success_callback( function( geo_data ) {
    // Figure out the user's location based on the returned data.
    // geo_data is an object that includes:
    // - latitude
    // - longitude
    // - country_short
    // - country_long
    // - region
    // - city

    if ( 'SAN FRANCISCO' === geo_data.city ) {
        return 'san-francisco';
    }

    return false; // default

} );

wpcom_geo.set_detect_error_callback( function() {
    // TODO: handle error here; default location is already set.
} );

// Kicks things off;
wpcom_geo.detect();

Caveats

Please get in touch before using this plugin.

This plugin relies on WP.com-specific functions to be fully functional but will work in your local environment with WP_DEBUG === true.

Note that either of these techniques should only be used with a very small list of countries for performance reasons.

If you want to show a specific page to a common group of countries, (for example show a cookie notice on all EU countries) the initial solution might seem to be using

wpcom_geo_add_location( 'fr' );
wpcom_geo_add_location( 'uk' );
... etc

But this will actually create a separate cache bucket for each region. greatly diminishing the cache hit % in European countries.

A better way would be to create 2 separate buckets. One for EU and one for the rest of the world like such:

if ( function_exists( 'vary_cache_on_function' ) ) {
    vary_cache_on_function(
    'if ( isset( $_SERVER["GEOIP_COUNTRY_CODE"] ) && in_array( strtolower( $_SERVER["GEOIP_COUNTRY_CODE"] ), ["be", "bg", "cz", "dk", "de", "ee", "gr", "ie", "el", "es", "fr", "gb", "hr", "it", "cy", "lv", "lt", "lu", "hu", "mt", "nl", "at", "pl", "pt", "ro", "si", "sk", "fi", "se", "uk"], true ) ) {
        return true;
    } else {
        return false;
    }');
}

 

Table of Contents

What does this plugin do?

The plugin automatically adds a table of contents to your pages based on h3 and h4 tags. It is useful for documentation-centric sites such as this one.

The “Contents” list you see at the top of many of the VIP Lobby pages such as our DNS documentation is this plugin in action.

How do I set it up?

After activating the plugin, create or edit any page and apply the h3 tags to your headings:

Apply Headings

When you publish or update the page, you’ll see a TOC at the top, with page jumps to each heading:

TOC

WP Page Numbers

Instead of “Next” and “Previous” pages, it shows numbers and arrows.

External Permalinks Redux

What does this plugin do?

This plugin allows you to point WordPress objects (posts, pages, or custom post types) to a URL of your choosing, which is particularly useful for injecting non-WordPress content into loops. The object appears normally in any loop output, but visitors to the object will be redirected to the specified URL.

How do I set it up?

Once you’ve activated the plugin, you’ll see a new External Permalinks Redux module in the edit post screen:

External

Simply add the URL you want the post, page, or custom post type to redirect to, choose the type of redirect, and update or publish the post.

For more information, please see the full plugin documentation here.

What features does the plugin offer?

The plugin allows you to choose the type of redirect, either temporary (302 or 307), or permanent (301).

Through a filter, the External Permalinks Redux meta box can easily be added to custom post types. There is also a function available for use with WordPress’ add_meta_box function.

This plugin was originally written for use on WordPress.com VIP. It is inspired by and backwards-compatible with Mark Jaquith’s Page Links To plugin, meaning users can switch between plugins without risk of losing any existing external links.

Ready to get started?

Drop us a note.

No matter where you are in the planning process, we’re happy to help, and we’re actual humans here on the other side of the form. 👋 We’re here to discuss your challenges and plans, evaluate your existing resources or a potential partner, or even make some initial recommendations. And, of course, we’re here to help any time you’re in the market for some robust WordPress awesomeness.