Author: karthi s

Resize parent colorbox iframe size

If we are loading some content within already existing iframe it will not resized automatically. It will show only it’s initial width and height. We can modify that parent iframe property by calling parent.$.fn.colorbox.resize(). Within that we can give our innerWidth and innerHeight. parent.$.fn.colorbox.resize({innerWidth:600,innerHeight:400}); Add this code inside ur script.

Read More…

Passing Javascript variables to PHP

It’s easy to get Javascript variable into PHP. What you have to do is follow below code. //in script blockvar veg = ‘Carrot’;//in php block$veg = "<script type=’text/javascript’>document.write(veg);</script>";echo ‘Printed My JS variable into PHP: ‘.$veg; Result will be:Printed My JS variable into PHP: Carrot

Read More…

Change default redirection URL in wordpress

wordpress login redirect: Open your WordPress/wp-login.php file, and find this line:$redirect_to = admin_url(); and replace it with this: $redirect_to = get_option(‘siteurl’); After login, Page will be redirected to home page WordPress logout redirect: find this code wp_safe_redirect( $redirect_to );  in Switch statement and in case ‘logout:’ Then add this code before that line $redirect_to = […]

Read More…