Sharing Session over subdomains in WordPress

Sometime we need to share login session into our subdomains. The user/member will not have to login again in the subdomains.

PHP in general,  we usually use
ini_set('session.cookie_domain', '.domain.tld');
if ( empty(session_id()) ) session_start();

Prefixed with ‘.’ in front of domain, on session.cookie_domain setting.

If familiar with CodeIgniter, just set in the config as
$config['cookie_domain'] = ".domain.tld";
How about in WordPress? It’s also simple, set in your wp-config.php
define('COOKIE_DOMAIN', '.domain.tld');
This session only can be shared into a single WordPress installation. Which mean, if you have other subdomains with another WordPress installation, this configuration might not work, since WordPress has another session for other installation. You have to work around to send your login session into another.

I am not testing yet to share session in the same domain but has different installation. For eg: main site is domain.tld has installation itself and the other, blog.domain.tld also has WordPress installation itself. But will try in another time. If you have experienced with this, please share.

Redesain situs Prima Web Indonesia

Seperti situs yang menawarkan jasa pembuatan web lainnya, situs Prima Web Indonesia juga jarang mengalami upgrade desain. Bahkan untuk desain, sudah terlalu lama, karena sebelumnya cuma memindahkan situs lama jadi pakai WordPress. Mohon jangan tanya alasannya kenapa? :-p

Setelah migrasi ke WordPress, akhirnya terpikirkan untuk mengupgrade situs Prima ini ke level berikutnya. Kali ini ditambah custom-post untuk Slider dan Portfolio. Supaya kedepannya lebih mudah jika ingin mengupdate bagian tersebut, saat menyelesaikan sebuah project. (Paling tidak kan jadi update terus bagian portfolio-nya)

Desain juga tidak macam macam, simpel aja, lebih banyak mengandalkan efek HTML5 (box rounded, box shadow, google fonts), kurang menggunakan image. Sedikit ditambahin efek javascript dari jQuery.

Hasilnya cukup puas untuk diri sendiri, mudah mudahan juga bisa cukup meyakinkan calon client.