You can not use conditional tags on init
Queries are only available after “wp” action hook, so ‘init’ is too early to check for it.
Queries are only available after “wp” action hook, so ‘init’ is too early to check for it.
Disable comments, pings trackbacks etc.. Set media sizes – optionally disable monthly based archiving. Set-up a functionality plugin for the site (add GA code, manage image_sizes, remove query string from sources etc.) . Permalink structure. Move wp-config. Modify wp-config define( ‘WP_POST_REVISIONS’, 3 ); Install favorite plugins Google Maps Easy Yoast SEO Contact Form 7 Create…
Actually, you do not want to open memcached port in your firewall. #ref: http://serverfault.com/questions/530051/memcached-ports-and-csf
I’ve been pulling my hair why my custom cursor wouldnt work. Turns out, IE (yes, big surprise) takes site url instead of stylesheet as baseurl when it comes to cursors.
If you want to add name email or any additional fields in addition to password for protected posts, see the steps below: /****************** custom protected post form *****/ add_filter( ‘the_password_form’, ‘custom_password_form’ ); function custom_password_form() { global $post; $label = ‘pwbox-‘.( empty( $post->ID ) ? rand() : $post->ID ); $a = ‘<div class=”clearfix”><form id=”password_form” class=”protected-post-form” action=”‘…
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())…
I 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…