Reliable method to detect mobiles

In my experience browscap.ini based checks are not terrible – at least. There is – probably not the only one – an PHP implementation with browsecap-php that can be used for PHP projects and would be suitable for WP projects too. As for a WordPress implementation, there is the plug-in – I know of – … Read more

double page title [duplicate]

I appreciate your comments, I have looked into a possible repeated question, however I did not find it as helpful as the last comment by @michel after looking into the functions.php file I found this filter add_filter( ‘wp_title’, ‘burger_wp_title’, 10, 2 ); function burger_excerpt_length( $length ) { return 50; } Which I have gotten rid … Read more

Modify comments_popup_link output

You can replace __( ‘No comments’, ‘textdomain’ ) with __( ‘<span>No</span> comments’, ‘textdomain’ ), there is nothing that stops you to do it. In general, HTML inside translatable strings are not recommended but if you really need the span tags, you have not other choice to add them server side. I strongly recommend to think … Read more

Strip HTML tags on custom code from the_content

Following Mark Kaplun advice, I fixed my problem. Just wish there was a way to like a comment. <?php $paragraphAfter = 1; // shows image after paragraph 1 $paragraphsShow = 1; // shows first two paragraphs $content = apply_filters(‘the_content’, get_the_content()); $content = explode(‘</p>’, $content); $max = (count($content) < $paragraphsShow) ? count($content) : $paragraphsShow; for ($i … Read more