Make rel=publisher Passed W3 Validator

rel=publisher is a HTML piece that makes Google recognize (by rich snippet parser) the publisher of current page in search result. Unfortunately, the common implementation of rel=publisher by <link> tag is not validated by W3 Validator. Although W3 validator is just a guide and we don't have to follow 100%, but we should if we can. This post … Continue reading →

Get URL of any PHP file in WordPress

Getting URL of current page or current PHP file is a very common task. And that is not exceptional in WordPress. For example: when you include a plugin in a theme, or using LESS PHP compiler. There're some available techniques, but I found that all of them are not good enough to work in all situation, so I hope what I write in this post is a better … Continue reading →

Google Launched Font Directory And Font API

Today, Google has launched an awesome service - Google Font Directory. The Google Font Directory provides high-quality web fonts that you can include in your pages using the Google Font API. These fonts are extremely easy to use and work in most browsers. … Continue reading →

Add more placeholder tags to WordPress SEO plugin

WordPress SEO plugin is the best SEO plugin for WordPress. It's very flexible in customizing meta title using placeholder tags like %%title%%, %%sitename%%. The problem is the list of placeholder tags are fixed and sometimes not satisfy our needs. For example, we can't show value of a custom field (post meta) in the title! In this post I'll show … Continue reading →

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 →