Category: "Programming" (34)

Exclude Latest Post in WordPress Custom Loop

Apr 21, 2024

When you build a website in WordPress, sometimes you may not want to show the latest post in a custom section. For example, on a news website, the latest post is...

Group Posts in Pairs in WordPress Custom Query

Mar 12, 2024

Sometimes, when you build a website using WordPress, you may want to show posts in a clean layout. For example, imagine you are creating a blog or product page where...

PHP function to get difference between dates

Jul 15, 2023

Below is a PHP function that calculates and displays the difference in days between two dates. This function will take two date strings as inputs, convert them to DateTime...

Get Current Page URL Without Query Parameters in PHP

Jul 14, 2023

When you work with websites using PHP, sometimes you need the clean page URL without extra parameters. For example, your URL may look like this: But in many real cases, you only...

Clean WordPress database infected with Malware

Jun 3, 2023

I just finished a new job to clean a WordPress website that was compromised with malicious codes. Removing the malicious codes from the theme files is easy, but the complex...

Delete users from WordPress database

May 30, 2023

I just finished a new job to clean a WordPress website that was compromised with malicious codes. While investigating I noticed that there were several unidentified admin users created on...