Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'wp', 'astra_add_title_filter' );
- /**
- * Function to add filters to change titles.
- *
- * @return void
- */
- function astra_add_title_filter() {
- add_filter( 'astra_the_title_before', 'astra_the_title_before_tag', 1, 10 );
- add_filter( 'astra_the_title_after', 'astra_the_title_after_tag', 1, 10 );
- }
- /**
- * Function to change tag in all titles.
- *
- * @param string $tag This contains default tag used for the titles.
- * @return string
- */
- function astra_the_title_before_tag( $tag ) {
- $tag = '<h1>';
- return $tag;
- }
- /**
- * Function to change tag in all titles.
- *
- * @param string $tag This contains default tag used for the titles.
- * @return string
- */
- function astra_the_title_after_tag( $tag ) {
- $tag = '</h1>';
- return $tag;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement