• 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_excerpt() – Displays the optional excerpt.

You appear to be a bot. Output may be restricted

Description

Displays the optional excerpt.

Wraps the excerpt in a div element. Create your own twentysixteen_excerpt() function to override in a child theme.

Usage

twentysixteen_excerpt( $css_class );

Parameters

$css_class
( string ) optional default: entry-summary – Optional. Class string of the div element. Defaults to 'entry-summary'.

Returns

void

Source

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


Lines:

1 to 12 of 12
  function twentysixteen_excerpt( $css_class = 'entry-summary' ) {
    $css_class = esc_attr( $css_class );

    if ( has_excerpt() || is_search() ) :
      ?>
			<div class="<?php echo $css_class; ?>">
				<?php the_excerpt(); ?>
			</div><!-- .<?php echo $css_class; ?> -->
			<?php
    endif;
  }
 

 View on Trac

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

Primary Sidebar

Information

Function name: twentysixteen_excerpt
Plugin ref: Twenty Sixteen
Version: 2.8
Sourcefile: inc/template-tags.php
File ref: inc/template-tags.php
Deprecated?: No
API Letters: E,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