To add before content widget, navigate to the Appearance > Widgets, drag and drop the text widget to the “Before content homepage”. See the screenshot for assistance.
Then expand the Text widget that you added and add your custom code there. Home page code can be found at
Specifically, take a look at the top code labeled “Get top widget area code” and paste it into widget area called ‘Before Content Home Page’. Hope this works