Autoload Must Use Plugins in Sub Folders in WordPress

In WordPress, there is a special folder in wp-content: mu-plugins which stands for Must Use Plugins. WordPress automatically loads all PHP files in this folder. This is a very cool features if you want to always turn on some plugins such as debugging plugins, SEO plugins or functionality plugin for your blog. The problem is WordPress doesn't load … Continue reading →

Get content before more tag in WordPress

Yesterday, I wrote a simple plugin for Deluxe Blog Tips to show a "giveaway" widget in the sidebar. That widget will get the content before more tag of the giveaway post and show it. The problem is that the excerpt functions, that we often use to get that content such as the_excerpt() or the_content( $more ), don't work! After digging more into … Continue reading →

Admin Body Class – Everything You Need To Know

In a recent project, I needed to add some styles for a specific admin page in WordPress. It is easy to enqueue a CSS file for a targeted admin page using the magic of current admin screen object, but it's not too easy if you want to use only 1 CSS file for all admin pages and still be able to style a particular page. Think about the style.css of a … Continue reading →

Display comments in homepage in WordPress

I had an interesting experience working with comments in WordPress. The task is display comments in homepage, like in Pinboard theme by Themify. It looked simple at first and I thought it can be done easily with wp_list_comments() but the truth is not like. In this post, I'm going to show a simple trick that solve this problem. … Continue reading →

How To Get Current Page Title In WordPress

Sometimes we want to get current page title, which is displayed in <title> tag. Here I mean the page in general meaning, not WordPress "page". We have several WordPress functions that can help such as: get_the_title(): to get current post/page/any post type title single_cat_title(): to get current category title. There're sibling functions … Continue reading →

A Note For WP Super Cache

WP Super Cache is one of most popular plugins for caching in WordPress. It has static page caching, database cache, browser cache, gzip, etc. - almost everything you need to make your website faster. It's just a problem I met when using it in my MultiSite install and I'd love if it can be improved. It's not a kind of bug, only a bad behavior, I … Continue reading →

jQuery Custom Event – A kind of Hook like WordPress

The most important feature that makes WordPress powerful and easy to customize is hook system. Developers can create as many hooks as he want, at various places that let users run extra code without modifying the original one. In Javascript (I mean pure Javascript), there's nothing like that, but in jQuery there is. It has a different name - custom … Continue reading →

How To Begin Writing: A Guide For Blogging

So, you’ve finally dove in and built yourself a blog. You’ve spent hours researching, picking your platform and designing your site. Now, you just have to start writing... It’s a tough reality, but most blogs fizzle within the first few months of creation. As the excitement of creating something ‘new’ wears off blogs begin to fall prey to poor … Continue reading →