Prevent direct access to php files from URL
In each of the other files, add these codes at the top. if (basename($_SERVER['PHP_SELF']) === basename(__FILE__)) {header($_SERVER["SERVER_PROTOCOL"] .…
In each of the other files, add these codes at the top. if (basename($_SERVER['PHP_SELF']) === basename(__FILE__)) {header($_SERVER["SERVER_PROTOCOL"] .…
function trim_words($string, $max_words) { $stringArr = explode(' ', $string); if(count($stringArr) > $max_words && $max_words > 0) { $string…
is_front_page() is_single() Returns true if the item is post, not page. It also accepts ID and name parameter…
Reference: Add a new widget area to a WordPress theme (by Keith Curreri on October 26, 2010) Add…
Reference: HOW TO CREATE YOUR OWN WORDPRESS SHORTCODESBY SARA VIEIRA | JUN. 04, 2013 In functions.php, create the…
In the past, the approach for creating the BPC is to first create a page template using the…
Template hierarchy WordPress uses the query string to decide which template or set of templates should be used to display…
"The Loop" is the main process of WordPress. You use The Loop in your template files to show posts to visitors.…
The cu-debug-functions.php contains two functions which can inspect variables in php codes. data_console( mixed $var, String $label =…