WordPress
Get custom fields for pages
To get values of custom fields from a post we use get_post_meta() but it doesn’t work for pages. get_metadata function has to be used for that purpose. It will bring custom fields meta data for pages. I used it to get some...
WordPress
Remove Category or Tag Slug from url
A client asked me in ThemeForest comments that how to remove category slug in URL of WordPress blog installation. I researched a bit and found a very helpful article on http://premium.wpmudev.org/. I am writing short version...
WordPress
Skipping post formats from query
If I do not want to show some post formats in any type of listing using custom query then this code is very helpful. $myposts = new WP_Query( array( 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' =>...