Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Plugin Name: First Attempt
- * Plugin URI: http://www.cubidesigns.co.uk
- * Description: This is my first attempt and replaces <h2> tags with <h3>
- * Version: 1.0
- * Author: Reece McDonald
- * Author URI: http://www.cubidesigns.co.uk
- */
- function change_tags($content)
- {
- $theContent = preg_replace('/<h2>/','<h3>', $content);
- $theContent = preg_replace('/<\/h2>/', '</h3>', $theContent);
- if(is_single())
- {
- return $theContent;
- }
- }
- add_filter('the_content','change_tags');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement