Similar Posts
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…
How to get random tags in wordpress
ByeminoI needed a placeholder for tags input but it’s boring to display the same tags every time. But unlike posts, WP doesnt have “rand” orderby paramater. So what you can do; is to get a #no of tags and shuffle them. So basically what we do is: Check if we have a recent transient If…
Better bootstrap accordion
ByeminoThere are a few issues (things I dont like) about the bootstrap accordion: 1- The title is inline, so you have to click the text part to activate it 2- There is no indication if the item is collapsed or open 3- :hover underlining is obnoxious. To solve all these; simply add the below css:…
WordPress menu limit
ByeminoSo I wasn’t able to add new items to wordpress menu and found out that the reason is the POST limit but adding max_input_vars = 2000 did not solve the problem (default is 1000). If you have suhosin and cant add new menu items or save your menu, you have to add the below to your…
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…
You can not use conditional tags on init
ByeminoQueries are only available after “wp” action hook, so ‘init’ is too early to check for it.