• 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 / twentytwenty_the_post_meta() – Get and Output Post Meta.

You appear to be a bot. Output may be restricted

Description

Retrieves and displays the post meta.

If it's a single post, outputs the post meta values specified in the Customizer settings.

Usage

twentytwenty_the_post_meta( $post_id, $location );

Parameters

$post_id
( int ) optional – The ID of the post for which the post meta should be output.
$location
( string ) optional default: single-top – Which post meta location to output – single or preview.

Returns

void

Source

File name: twentytwenty/inc/template-tags.php
Lines:

1 to 5 of 5
function twentytwenty_the_post_meta( $post_id = null, $location = 'single-top' ) {

  echo twentytwenty_get_post_meta( $post_id, $location ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in twentytwenty_get_post_meta().

}
 

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 8th April 2020

Primary Sidebar

Information

Function name: twentytwenty_the_post_meta
Plugin ref: Twenty Twenty
Version: 2.1
Sourcefile: inc/template-tags.php
File ref: inc/template-tags.php
Deprecated?: No
API Letters: M,P,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.1.1. PHP: 8.0.28
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