Have you ever wondered how to retrieve the content of a specific WordPress post using its post ID? In this guide, we’ll walk you through the simple steps to unveil the content of any post with ease. Step 1: Locating the Post ID Before […]
Sometimes SQL knowledge is critical for WordPress developers to run mass updates on your posts. In this post, we are sharing an example SQL query to get posts using a category name. This requires database access and some basic SQL knowledge. To get all posts […]
To get a list of WordPress Posts using meta query in MySQL, you can use the following SQL query: SELECT p.ID, p.post_title, m.meta_id, m.meta_key, m.meta_value FROM `wp_posts` p LEFT JOIN `wp_postmeta` m ON p.ID = m.post_id WHERE m.meta_key = ‘wpcf-show-status’ AND m.meta_value ” ORDER BY […]
If you have been 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 the most useful SQL queries you can use to clean up your WordPress […]
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 […]
If you want to insert the same tags to every post on your blog post, you can set it to be done automatically using PHP. Using this simple snippet, all tags will be added automatically on post save and publish.
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, but most of your plugins do. WordPress scripts are registered on a script queue using […]
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.
I showed you how to use widgets using the_widget in your php templates before. Upon request, I am going to show you how to use WordPress RSS Widget with the help of WordPress the_widget function.
Random posts can be a great opportunity to generate hits for older content. Especially for gaming and portfolio sites this snippet will be great use. Here is how to set it up for your theme.