• 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 / twentynineteen_excerpt_more() – Replaces "[.

You appear to be a bot. Output may be restricted

Description

Replaces "[.

..]" (appended to automatically generated excerpts) with … and a 'Continue reading' link.

Usage

$string = twentynineteen_excerpt_more( $link );

Parameters

$link
( string ) required – Link to single post/page.

Returns

string 'Continue reading' link prepended with an ellipsis.

Source

File name: twentynineteen/functions.php
Lines:

1 to 13 of 13
function twentynineteen_excerpt_more( $link ) {
  if ( is_admin() ) {
    return $link;
  }

  $link = sprintf(
    '<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>',
    esc_url( get_permalink( get_the_ID() ) ),
    /* translators: %s: Post title. Only visible to screen readers. */
    sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentynineteen' ), get_the_title( get_the_ID() ) )
  );
  return ' &hellip; ' . $link;
}
 

 View on GitHub View on Trac

Published: 13th March 2021 | Last updated: 9th June 2022

Primary Sidebar

Information

Function name: twentynineteen_excerpt_more
Plugin ref: Twenty Nineteen
Version: 2.4
Sourcefile: functions.php
File ref: functions.php
Deprecated?: No
API Letters: E,M,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