X

April Fools Prank: How to Reverse Titles on Your Homepage

Snippets by IsItWP

Do you want to reverse titles on your WordPress homepage? With this snippet, you can temporarily display your page title in reverse order on the homepage.

Instructions:

All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin. Just remove the snippet from the functions.php and your website will return to normal.

function april_fools_wps($text){
    if(is_home()){return strrev($text);}else{return $text;}
}
add_filter('the_title', 'april_fools_wps');

Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.

If you liked this code snippet, please consider checking out our other articles on the site like: Best WordPress Page Builders (Compared).

Comments   Leave a Reply

  1. Thank you for this!

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!