ifrtest
123

Previously we have established that the fastest way to get an ID is using wpdb . So, simply to get a random post link use: function eo_get_a_rand_postlink() { global $wpdb; $rand_post_id = $wpdb->get_var(“SELECT ID FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_type = ‘post’ ORDER BY RAND() LIMIT 1”); return get_permalink($rand_post_id); }
My navigation menu started disappearing on category pages. First I suspected there was something with the header or menu location, I have double, triple checked everything and I was pulling my hair out trying to find a solution. Turns out, my attempt to order posts by a custom field interfered with the menu. if( ! $query->is_main_query())…
İnternette artık 3-4 karakterli alanadı bulmak imkansız gibi biliyorsunuz, yeni çıkan uzantılarda bile. Ben de bir tane 3 harfli almış bulundum “.so” uzantılı, HavaNasilOralarda.com adlı site adı çok uzun olduğu için hno.so almıştım URL kısaltma amaçlı. Saçma sapan 99$ yenileme ücretinden daha ilginç olan durum ise şu ki; domainin süresi bitmeden önce yenileyemiyorsunuz. Önce süresi…
The story: I was getting session file write errors (write failed: No space left on device (28) ) in wp admin, i checked /tmp folder but it was not full, only 60% percent was used. So not being able to pinpoint what the problem was, i thought a reboot would be a good idea. But…
Queries are only available after “wp” action hook, so ‘init’ is too early to check for it.
So I rebooted my server and everything seemed to be working, mysql, apache everything running but the websites werent loading. I could not instantly remember the cause because a machine reboot is not something you do on your server every day. The reason was I had varnish installed and it failed to start after reboot…