Some of the small but useful code for WordPress

Add the below Functions in your function.php File 1) PHP execution in Widget, Post and Page Editor of WordPress add_filter(‘wp_post’,’execute_php’,100); add_filter(‘widget_text’,’execute_php’,100); add_filter(‘the_content’,’execute_php’,100); function execute_php($html){ if(strpos($html,”<“.”?php”)!==false){ ob_start(); eval(“?”.”>”.$html); $html=ob_get_contents(); ob_end_clean(); } return $html; } 2) Hide Top Admin Bar from website when u … Continue reading