• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / twentysixteen_entry_meta() – Prints HTML with meta information for the categories, tags.

You appear to be a bot. Output may be restricted

Description

Prints HTML with meta information for the categories, tags.

Create your own twentysixteen_entry_meta() function to override in a child theme.

Usage

twentysixteen_entry_meta();

Parameters

Returns

void

Source

File name: twentysixteen/inc/template-tags.php


Lines:

1 to 39 of 39
  function twentysixteen_entry_meta() {
    if ( 'post' === get_post_type() ) {
      $author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 );
      printf(
        '<span class="byline"><span class="author vcard">%1$s<span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></span></span>',
        get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ),
        _x( 'Author', 'Used before post author name.', 'twentysixteen' ),
        esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
        get_the_author()
      );
    }

    if ( in_array( get_post_type(), array( 'post', 'attachment' ), true ) ) {
      twentysixteen_entry_date();
    }

    $format = get_post_format();
    if ( current_theme_supports( 'post-formats', $format ) ) {
      printf(
        '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
        sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentysixteen' ) ),
        esc_url( get_post_format_link( $format ) ),
        get_post_format_string( $format )
      );
    }

    if ( 'post' === get_post_type() ) {
      twentysixteen_entry_taxonomies();
    }

    if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
      echo '<span class="comments-link">';
      /* translators: %s: Post title. Only visible to screen readers. */
      comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen' ), get_the_title() ) );
      echo '</span>';
    }
  }
 

 View on Trac

Published: 25th November 2019 | Last updated: 9th June 2022

Primary Sidebar

Information

Function name: twentysixteen_entry_meta
Plugin ref: Twenty Sixteen
Version: 2.8
Sourcefile: inc/template-tags.php
File ref: inc/template-tags.php
Deprecated?: No
API Letters: E,M,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.1.1. PHP: 8.0.27
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wp-a2z.org
© Copyright WordPress a2z 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites