12+ Useful SQL Queries for WordPress Database Cleanup

If you are using WordPress for a long time, it is possible that you have many spam comments, revisions, transients cache etc. on your wp database. In this post, I listed most useful SQL queries you can use to clean up your WordPress database and reduce its size around 85%! [toc] Tools Required My favorite tool for […]

Read more 12+ Useful SQL Queries for WordPress Database Cleanup

Shortcode to Display Content Only on Mobile

Did you know that WordPress has a mobile detect function already? In this post, I will show you how you can use wp_is_mobile function to create a simple shortcode to hide certain parts of your posts from mobile visitors or the other way. Demonstration Desktop View Mobile View The Shortcode wp_is_mobile function returns true when […]

Read more Shortcode to Display Content Only on Mobile

[How to] Replace WordPress jQuery with CDN jQuery

If your hosting server is not fast enough, you may want to replace your self-hosted jquery with Google CDN hosted jquery. You may think that you are not using that script anyways, but most of your plugins do. WordPress scripts are registered on a script queue using tags. So, WordPress won’t load same javascript library […]

Read more [How to] Replace WordPress jQuery with CDN jQuery

[How to] Change Number of Posts Displayed on Search Only

WordPress usually use a constant number of posts for all your category pages, index, and also search results pages. For search pages, 10 posts are not usually enough. To change this behavior, a simple query filter will do the trick.

Read more [How to] Change Number of Posts Displayed on Search Only