snippets

Register Widget Area in WordPress

Register Widget Area in WordPress

If you work in WordPress and need a way to register a new widget area in WordPress where you can use plugin to do that or add simply code on WordPress function.php file. This code snippet will let you register widget area using Wordpress built-in register_sidebar function Steps to register widget area on WordPress: Open Wordpress admin panel then go

Detect User from Google Search in WordPress

Detect User from Google Search in WordPress

If you work in WordPress and need to show the message for the user who comes from Google search to can convert this user as lead or display newsletter popup. This code snippet will let you display custom message to user who detected form google search by using HTTP_REFERER variable with PHP where it's an optional HTTP header field which

Increasing WordPress Memory Limit

Increasing WordPress Memory Limit

If you work in WordPress and need a way to increase the memory limit in WordPress to can add more resources to WordPress, there are a few ways to do that and will explain one of this ways so all you need to add a PHP constant to the wp-config.php file. WP_MEMORY_LIMIT is a PHP constant add to the WordPress

How Enable/Disable Debug Mode In WordPress

How Enable/Disable Debug Mode In WordPress

If you work in WordPress and need a way to enable debug more on it with a certain page to can get information about something wrong easily, all you need to add a PHP constant to the wp-config.php file. WP_DEBUG is a PHP constant add to WordPress since Version 2.3.1 and has the boolean value true or false. This code

How to Add Body Classes in WordPress

How to Add Body Classes in WordPress

Sometimes you looking for add CSS Classes to body tag in WordPress theme for make some changes in style or control page for some reason so WordPress team provide body_class filter to can ease add CSS Classes here how to add CSS to body: All you need to open your theme functions.php file and add this code: [php] function zytheme_add_body_classes(