Similar Posts
WordPress otomatik güncelleştirmeleri kapatma
ByeminoBir wordpress geleneği “başımıza iş çıkartma”.. 3.7 ile birlikte arkaplanda otomatik güncelleştirmeler eklendi. Günlük blogger için güvenlik açısından kullanışlı özellik olsa da çoğunluk için unutulduğu takdirde başa bela olacaktır. Yeni sürümle değişien core fonksiyonlar, çalışmayan tema & eklentiler, sağda solda hatalar, hatta belkide tamamen sitenin çökmesine sebep olabilir. Arkaplan güncelleştirmelerini kapatmak için wp-config’e eklemeyi unutmamak…
Fastest way to get a random post link in wp
ByeminoPreviously 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); }
This site is optimized with the Yoast WordPress
ByeminoIf you have a comment in your <head> that says <!– This site is optimized with the Yoast WordPress –> it’s not a big deal for the average user, but if you do not want to openly reveal that you are using WordPress, this is utterly annoying for you. I usually use my own functions…
Page template pagination fix
ByeminoIf you are using “page-template”s you’ll have problems with pagination since pages are not meant to display posts and some people frown upon using page-templates for custom archive display, but it’s sometimes the simplest way. Anyway the solution is 1.) to nullify the global $wpquery 2.) adding ‘paged’ => $paged arg. before displaying your posts…
get_plugin_data() only in admin ? Why ?
ByeminoIt provides crucial plugin info and many pointers. Like plugin folder, plugins name, plugins main file . More importantly, it could help you with a global unique_slug. More on this, and get_file_data() workaround later…