Problems with multibyte characters
There are mb_strlen() and mb_substr() for multibyte characters however there is no mb_str_word_count. Hence my previous post.
There are mb_strlen() and mb_substr() for multibyte characters however there is no mb_str_word_count. Hence my previous post.
There are various ways to get user_ID in WP. But which one is the fastest ? I’ve compared 3 ways function get_uid_from_global() { global $current_user; return $current_user->ID; } function get_uid_by_gcuid() { return get_current_user_id(); } function get_uid_by_wpgcu_id() { return wp_get_current_user()->ID; } Without a doubt, global method was fastest. With multiple 100,000 runs, global method took 0.9~…
Actually, you do not want to open memcached port in your firewall. #ref: http://serverfault.com/questions/530051/memcached-ports-and-csf
If 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…
If you are familiar with WordPress, you should already know that you should almost never have to use get_posts(). Your best bet is to use WP_Query . As good as wp_query is, you should still fine-tune it depending on your needs, it does make a difference. For example, if you just need 1 random post…
Just use javascript:void(0) instead of # for href You might encounter this error most likely in Firefox Console
When your content area is smallar then your offcanvas menu you’ll get double-rainbowed. To prevent this simply remove either body | html from the following rule in offcanvas.css /* * Style tweaks * ————————————————– */ html, body { overflow-x: hidden; /* Prevent scroll on narrow devices */ } so that it reads: body { overflow-x:…