Skip to main content

Posts

Showing posts with the label custom fields

WordPress – Adding custom fields to the post

WordPress has a way where developers can create custom fields to the post. With this way we can extend WordPress functionality and fulfill our requirement. This extra custom fields data is known as meta-data. Meta data allow you to add some additional data to the post. In this tutorial we will discuss how to create WordPress custom fields and insert some additional data to the post. This step by step tutorial provides you an easy way to add custom post meta box in WordPress. Now we will add a custom meta box into post adding page. Through this custom meta box we will insert the author name of post. Also we will display the author name of respective post at the post listing page or post details page. All the meta box related working will be done in theme’s functions.php file. So, open the functions.php file of current active theme and follow the below steps. Step 1: Adding Custom Meta Box add_meta_box() function is used to add meta boxes to the administrative interface. The below cod...