Skip to content

Webskillet/tldr

Repository files navigation

TL;DR

TL;DR is a base Wordpress theme developed by Jonathan Kissam

Features

Shortcodes

[html]: this shortcode allows the insertion of arbitary html code, removing the extra <p> and <br> tags inserted by the wpautop filter.

[post-summary]: this shortcode essentially inserts an implementation of WP_Query. Any of the WP_Query parameters can be implemented as an attribute of the shortcode, except for the fields paramater and the parameters which require associative arrays: tax_query, date_query, meta_query and the orderby associative array option.

The shortcode will display the post title (in <h2 class="post-summary-title">), if requested via custom attribute, the post thumbnail (in <div class="post-summary-thumbnail">), and the post content (in <div class="post-summary-content">). Each summary will be wrapped in a <div class="post-summary">.

Unless explicitly overridden, it will display all posts which meet the criteria, in descending date order - in other words, by default it will pass the following parameters to WP_Query:

orderby => 'date'
order => 'DESC'
posts_per_page => -1

The shortcode will also exclude any posts which have previously been displayed on the page using the p attribute to load a single post (i.e., [post-summary p="123"]). This allows the display of one or more summaries at the top of an otherwise ordered list.

In addition, the shortcode offers several custom attributes:

  • n: alias of posts_per_page
  • display_thumbnail: passing any value which evaluates to true will include the post thumbnail, if one exists
  • post_thumbnail_size: size for post thumbnail (defaults to 'post-thumbnail')
  • read_more: text to be passed to get_the_content to be used as a read more link (defaults to "Read more")

Development log

1.3: 8/9/2016 Added [post-summary] shortcode

1.2: 5/4/2016 Fixed error which was not loading scripts properly

1.1: 1/25/2016 Added support for uploading and/or selecting a logo, using the Wordpress media uploader.

About

TL;DR is a base Wordpress theme

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published