Our Blog

0 98

WordPress settings_errors() display update message twice

In wordpress plugin or theme settings API, when we add settings error, I face problem with display update message twice. and this is happen only when first times settings save. After a day long troubleshooting, I got this is because when update_option, it call add_option function first time. and that is the main reason to display update message duplicate in first time save. To resolve this issues, I added default options value by update_option when plugin is active and error Read more
0 142

Redirect an Old Domain to your New Website

Simply enter the following code into your .htaccess file (changing the addresses in the examples below as needed) and save the changes. If there are several individual pages which have moved, just repeat as neccesary. Not sure how to access or change or .htaccess file. Read our .htaccess guide here.   Method 1: Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain.com [NC] RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC] RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301] Method 2: Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} \olddomain.com$ Read more