Theme with WPML on subdomains

Most of the times, there is a problem when setting up WPML to use subdomains because clients cannot edit pages from them using the Page Builder. The main problem lies in the website’s configuration because when a user logs in to the main domain, let’s say http://www.example.com, WordPress will create a cookie that will be used to confirm the user is logged in. At that time, if a new page will be added to http://www.example.com, it cannot be edited with the page builder when accessing it via a subdomain, for example: http://es.example.com.

To overcome this problem you need to verify the existance of the constant COOKIE_DOMAIN in the wp-config.php file. If it’s not there, add it:

define('COOKIE_DOMAIN', 'example.com');

If it is, then make sure it looks like in my example above.

Once you have added it, you should now be able to login to any of the subdomains you have configured on your website and edit any page using the Page Builder from the theme.