wpseek.com
A WordPress-centric search engine for devs and theme authors



get_post_format_link › WordPress Function

Since3.1.0
Deprecatedn/a
get_post_format_link ( $format )
Parameters:
  • (string) $format The post format slug.
    Required: Yes
Returns:
  • (string|WP_Error|false) The post format term link.
Defined at:
Codex:

Returns a link to a post format index.



Source

function get_post_format_link( $format ) {
	$term = get_term_by( 'slug', 'post-format-' . $format, 'post_format' );
	if ( ! $term || is_wp_error( $term ) ) {
		return false;
	}
	return get_term_link( $term );
}