• 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_read_more_tag() – Overwrite default more tag with styling and screen reader markup.

You appear to be a bot. Output may be restricted

Description

Overwrite default more tag with styling and screen reader markup.

Usage

$string = twentytwenty_read_more_tag( $html );

Parameters

$html
( string ) required – The default output HTML for the more tag.

Returns

string

Source

File name: twentytwenty/functions.php
Lines:

1 to 3 of 3
function twentytwenty_read_more_tag( $html ) {
  return preg_replace( '/<a(.*)>(.*)<\/a>/iU', sprintf( '<div class="read-more-button-wrap"><a$1><span class="faux-button">$2</span> <span class="screen-reader-text">"%1$s"</span></a></div>', get_the_title( get_the_ID() ) ), $html );
}
 

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 25th November 2019

Primary Sidebar

Information

Function name: twentytwenty_read_more_tag
Plugin ref: Twenty Twenty
Version: 1.6
Sourcefile: functions.php
File ref: functions.php
Deprecated?: No
API Letters: M,R,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 5.6. PHP: 7.3.26
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-2021. All rights reserved.


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

  • Home
  • Blog
  • Sitemap
  • Sites