This tutorial will explain how to add a widget area before the content on single post pages. Using something other than a text widget here may require additional custom coding.
Because simple mistakes in the functions.php file can result in your site going down we recommend that you have a backup of the files to fall back on and that you know how to restore your site via FTP or your hosting cpanel before attempting this customization.
The first step is to add this snippet to your functions.php file:
and then you can add this snippet to the Additional CSS panel in the customizer (Appearance > Customize > Additional CSS):
After you’ve got the snippets added then you can find your new widget area by navigating to Appearance>Widgets. You can now drag and drop widgets here for anything you’d like to add to the top of all of your posts.