'custom-thumbnail-class')); $content = $thumbnail . $content; } return $content; } add_filter('the_content', 'display_thumbnail_before_content'); // Create Year shortcode to replace with current year or a number of years added to the current year. add_shortcode( 'year', 'current_year' ); function current_year( $atts ) { $year = date( 'Y' ); if ( isset( $atts['years'] ) ) { $year += intval( $atts['years'] ); } return $year; } // To allow Rank Math Frontend title to parse shortcode. add_filter( 'rank_math/frontend/title', function ( $title ) { return do_shortcode( $title );} ); // Activate shortcode function in Post Title. add_filter( 'the_title', 'do_shortcode' ); ?>
Scroll to Top