insert custom widget before posts

Community Forums Forums General Discussion insert custom widget before posts

This topic is: resolved

This topic contains 4 replies, has 4 voices, and was last updated by  phamhung 1 year, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #41163

    phamhung
    Participant
    Post count: 31

    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.

    Thanks.

    #41186

    UT Mod
    Participant
    Post count: 160

    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.

    #41188

    AC
    Blocked
    Post count: 7712

    Here is the Visual Markup Guide – http://genesistutorials.com/visual-hook-guide/. You can find the location you are seeking with it.

    #41314

    braddalton
    Participant
    Post count: 10594

    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.


    #41316

    phamhung
    Participant
    Post count: 31

    Thank you, guys. genesis_before_loop and some conditions have resolved my issue.

    Cheers!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘insert custom widget before posts’ is closed to new replies.