Ideally I am looking for two text boxes added to the ‘Add new post’ admin page, and the data from those two boxes be displayed in the sidebar when viewing the post page. So the sidebar displays the data belong to the post…. Two widgets for each post. Possible?
Thanks a ton in advance!
You should take a look into creating custom meta boxes to display the text fields in the admin & then save that data as post meta. There are many tutorials available online for this
Once you have the information, you can put a
get_post_meta
call in your theme’s sidebar.php file & display the data there directly. If you want it in widget format, you’ll have to create a custom widget to display the meta information. Again there are many tutorials available online for this.When displaying the info you can add a condition like