Skip to content

Instantly share code, notes, and snippets.

@Archie22is
Created January 13, 2023 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Archie22is/fc134d0ef4cd9da58068f8efb8d8473e to your computer and use it in GitHub Desktop.
Save Archie22is/fc134d0ef4cd9da58068f8efb8d8473e to your computer and use it in GitHub Desktop.
WordPress Modify HTML functions - Drop this in your functions.php
<?php
function start_modify_html() {
ob_start();
}
function end_modify_html() {
$html = ob_get_clean();
$html = str_replace( 'Next Project', 'Next Offer', $html );
$html = str_replace( 'Previous Project', 'Previous Offer', $html );
echo $html;
}
add_action( 'wp_head', 'start_modify_html' );
add_action( 'wp_footer', 'end_modify_html' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment