Here is what I want to do:
– I have a theme with 2 columns: content in the left and sidebar in the right.
– I want to insert some custom widgets before the content in the left column.
Which hook can I use please? Cannot use genesis_before_post, cause it will insert before every post.
for this kind of stuff, use Genesis Visual Hook Guide plugin. It will precisely show you where you could hook stuff.
for now I believe you could use genesis before loop or genesis before content sidebar wrap.
Here is the Visual Markup Guide – http://genesistutorials.com/visual-hook-guide/. You can find the location you are seeking with it.
Here’s some code you can use.
Change the conditional tag if needed to is_single() or is_singular() if you want to display content on all single posts and single pages after the title but before the content.
Code not displaying? Grab it on Github.
Thank you, guys. genesis_before_loop and some conditions have resolved my issue.
The topic ‘insert custom widget before posts’ is closed to new replies.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.