Skip to content
Viliam Kopecký edited this page Dec 7, 2015 · 6 revisions

Mostly based on Latte templating and filters

  • {$str | url}
  • {$str_or_array | length}
  • {$str | webalize}
  • {$str | padLeft}
  • {$str | padRight}
  • {$str | reverse}
  • {$str | truncate:100} - shortens the $str to fill 100 chars.

WP filters

{$Post | wp_title}

Title of $Post.

{$Post | wp_content}

Content of $Post.

{$Post | wp_excerpt}

Excerpt of $Post.

{$Post | wp_permalink}

Permalink of $Post.

{$Post | wp_date:'j.n.Y'}

Formats publish date of $Post.

{$Post | wp_DateTime}

Converts publish date value to DateTime object.

{$Post | wp_meta:'meta_name'}

Returns single meta value.

{$Post | wp_meta_list}

Returns meta values as array.

{$Post | wp_terms:'taxonomy_slug'}

Returns array with terms of $Post of taxonomy by its slug.

{$Image | wp_image:'xl'}

Returns URL to image of defined size. Works dirctly on media post_type.

{$Post | wp_thumbnail:'xl'}

Like wp_image but works on $Post which has a thumbnail.

{$Post | wp_esc}

Unescapes html entities, which WordPress saves to database. Then escapes with standard Latte escaping.

{$str | nbsp}

Replaces regular spaces with non-breaking UTF-8 characters.

Clone this wiki locally