• Hello I am currently using the theme Hueman with a child theme in place. What do I need to do to add a linked banner image after every post and above the comments section globally?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi jmask. If you’re looking to add a banner on every single post, above the comments section, you could do this:

    1. Create a new sidebar in Theme Options > Sidebars; give it a unique id like “my-post-widget” or whatever you like.

    2. In Widgets, add a text widget to the sidebar, then add your image link code in the widget.

    3. Copy single.php from the parent theme to your child theme.

    4. In your child theme single.php file, find the following lines at the bottom of the code:

    <?php if ( ot_get_option( 'related-posts' ) != '1' ) { get_template_part('inc/related-posts'); } ?>
    
    <?php comments_template('/comments.php',true); ?>

    5. Add the dynamic sidebar code:

    <?php if ( ot_get_option( 'related-posts' ) != '1' ) { get_template_part('inc/related-posts'); } ?>
    
    <div class="my-post-widget">
        <?php dynamic_sidebar('my-post-widget') ?>;
    </div>
    
    <?php comments_template('/comments.php',true); ?>

    6. You may need to add some css to position it; something like this:

    .single .my-post-widget {
        float:left;
    }

    I managed to do this with the WP QUADS plugin with little or no difficulty.

    @twirth5 – Good to know. Thanks for posting the info.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Linked image (banner) after post before comments’ is closed to new replies.