December 30, 2024
1 min read
Essential Code Snippet For Web Developers

To set post revision limit put this code at the end of wp-config file. We set 3 here to set limit 3 times. you can use false to deactivate post revision

wp-config.php
/**
 * WordPress post revisions 
 * Number / true / false
 */
define( 'WP_POST_REVISIONS', 3);

When you developing a WordPress site you may need to show PHP debug on so you can check if there is an error on your code. To active PHP debug put the one line code on wp-config.php file on your home directory.

wp-config.php
/**
 * php Debug troggle
 * true / false
 */
define( 'WP_POST_REVISIONS', true );

It recommended checking the wp-config file if that code already exists, you can just modify that. Before go on production mood make wp_debug – false.

If you face load-scripts.php problem put the code on wp-config file

wp-config.php
/**
 * load-scripts.php problem fix
 */
define( 'CONCATENATE_SCRIPTS', false );

Leave a Reply

Your email address will not be published. Required fields are marked *

Jquery Replace specific text in all element

Scenario Imagine you have a set of elements with the class specific_class, and they all contain the phrase “old text.” You want to replace this phrase with “New text” programmatically. The Solution Here’s a simple jQuery script to achieve this: How It Works Things to Keep in Mind Extending the Script jQuery provides a quick […]

Animated jQuery Counter Up with the Intersection Observer API

Learn how to create a simple counter animation using HTML, CSS, and JavaScript in this tutorial.

JS fetch post API Data in 5 min simple way

js fetch post API is very simple way. some line of Javascript code and boom.

WordPress Ajax Search without plugin [ Easy ]

WordPress Ajax Search without plugin. Fully custom code work with woocommerce as well

Web Development Project in mind?

if you looking for a web developer for paid contribution to your project I am available for work.

Mukto
Mukto

Click the button below to chat with me.