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 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:…
Always check for local time Despite the fact that my server timezone was set correctly, somehow time() was giving wrong ( UTC) hour. So i ended up using wp’s functions to make sure. $now = current_time( ‘timestamp’, 0 ) ;$local_ts = get_the_time(‘U’,$post->ID);
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…
It’s always a pain to work with multibyte characters; most fonts only support ISO-8859-1 English letters. I was working with Imagemagick but some of the strings contained Arabic, Chinese, Russian letters, even some Chinese / Korean, and i did not want to end up with ???’s instead of non-supported characters all over the place. The…
Just use javascript:void(0) instead of # for href You might encounter this error most likely in Firefox Console
View the code on Gist.