Advanced Custom Field (ACF) is a free WordPress plugin to create custom field meta box in WordPress without having to code anything. If you have used ACF, you know how easy it is to use and create custom meta boxes in WordPress. If you want to echo an ACF field value then you use use following code: If you want to get the value of an ACF field as a […]
Why is a child theme important in WordPress?
Sometime the default WordPress Admin panel can become a bit boring. If you want to jazz it up and want to show custom background color for each post status then following snippet of code can help. Just paste it in your theme’s functions.php and change the color accordingly
The “body_class()” in WordPress adds classes to the body tag of all the pages in your WordPress site. By default a WordPress theme should use the function “body_class()” in their theme files so that WordPress can automatically output correct classes to each page/post and archive. The following example shows how to implement the body_class template tag into a theme. The actual HTML output might resemble something like this: If you […]
RSS (Rich Site Summary) is a format for delivering regularly changing web content. Many news-related sites, weblogs and other online publishers syndicate their content as an RSS Feed to whoever wants it. If you would like to use RSS feed of some other site to show their latest posts into your site/blog then WordPress has a handy function which you can use to pull the posts from another site. Following code helps you […]
If you want to dynamically add your own class to every image added from WordPress Editor then use following code. Add the code into your theme’s functions.php file and change the class according to your requirement.
In WordPress, you can only remove post featured image one by one by editing each post and clicking on the “Remove Featured Image” link, which is easier to do if you have only few posts but if you have hundreds of posts then removing them one by one can be a daunting task. But fear not, there is a simpler and easier way to bulk remove featured image in WordPress. […]