How do I insert an image above my bottom share bar on all post?
-
I am assuming I modify the post.php file somewhere before the bottom share bar, but I have no idea what to do.
ANY HELP is appreciated.
Thank you for your time.
-
Hi,
Do you want to put the same image for every post? o you want to select one for each one?
Same image for every post.
To give you some more context, I created a little logo that says “Sharing is caring” with an arrow pointing down. I want the logo placed right above the bottom share bar so it points at it.
Thank you for your reply, bensita.
I agree: sharing is caring! Share with us a link to your site, so we can check theme that you are using ??
I agree: sharing is caring! Share a link to your site so we can know wich theme are you using ??
https://www.dustinmaherg.com/2016/01/what-i-learned-from-a-multi-millionaire/
It is Michael Hyatt’s GetNoticedTheme.
Please ignore the related post section. I am still trying to figure out how to fix this CSS and move below the “LIKE THIS POST” box as well.
I am thinking once you teach me where to insert code for the image above share bar, I can paste the php code for the related post below the share bar fixing two problems at once :).
Ok, this is a premium theme, so I have no access to the code.
Can you share here the code of post.php?Wel, about the image, you can put some HTML (because is the same image always).
Something like this perhaps:
<div class="sharing"> <img class="img-sharing" src="your image url here"> </div>
??
Sorry for delay – I went to lunch. I could not find a “post.php”. Here are my options:
https://www.dustinmaherg.com/2016/01/templates/
Thank you so much for the rapid comments. I am excited to get this fixed.
I am assuming to edit single.php ? If so, here is the code:
<?php /** * The Template for displaying all single posts. * * @package GetNoticed * @since GetNoticed 1.0 */ # Add the audio player for the audio post type if ( 'audio' == get_post_type() ) { if ( function_exists('getnoticed_audioplayer_header') ) add_action( 'wp_head', 'getnoticed_audioplayer_header' ); } # Disable filters if ( 'post' == get_post_type() ) { if ( in_category('podcast') && function_exists('speakpipe_footer') ) add_action( 'wp_footer', 'speakpipe_footer' ); } elseif ( 'page' == get_post_type() ) { # Load custom meta data remove_action( 'the_content', 'add_post_footer', 0 ); remove_filter( 'the_content', 'nrelate_related_inject', 10 ); remove_filter( 'the_content', 'smartads_insert', 9 ); } else { # Disable potential plugins we don't want remove_action( 'the_content', 'add_post_footer', 0 ); remove_filter( 'the_content', 'nrelate_related_inject', 10 ); remove_filter( 'the_content', 'smartads_insert', 9 ); } add_action('wp_head', 'getnoticed_opengraph_meta'); get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php getnoticed_content_nav( 'nav-above' ); ?> <?php get_template_part( 'content', get_post_type() ); ?> <?php getnoticed_content_nav( 'nav-below' ); ?> <?php if ( ! getnoticed_option('nuke-comments') ) { // If comments are open or we have at least one comment, load up the comment template if ( comments_open() || '0' != get_comments_number() ) { get_template_part( 'comments-pre' ); comments_template( '', true ); } } ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary .site-content --> <?php get_sidebar(); ?> <?php get_footer(); ?>
Oh yes! Sorry, I meant single.php ??
I′m pasting the same code with modifications.
IMPORTANT: please find in the code “your image url here” and replace it with the actual url of the image ??<?php /** * The Template for displaying all single posts. * * @package GetNoticed * @since GetNoticed 1.0 */ # Add the audio player for the audio post type if ( 'audio' == get_post_type() ) { if ( function_exists('getnoticed_audioplayer_header') ) add_action( 'wp_head', 'getnoticed_audioplayer_header' ); } # Disable filters if ( 'post' == get_post_type() ) { if ( in_category('podcast') && function_exists('speakpipe_footer') ) add_action( 'wp_footer', 'speakpipe_footer' ); } elseif ( 'page' == get_post_type() ) { # Load custom meta data remove_action( 'the_content', 'add_post_footer', 0 ); remove_filter( 'the_content', 'nrelate_related_inject', 10 ); remove_filter( 'the_content', 'smartads_insert', 9 ); } else { # Disable potential plugins we don't want remove_action( 'the_content', 'add_post_footer', 0 ); remove_filter( 'the_content', 'nrelate_related_inject', 10 ); remove_filter( 'the_content', 'smartads_insert', 9 ); } add_action('wp_head', 'getnoticed_opengraph_meta'); get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php getnoticed_content_nav( 'nav-above' ); ?> <?php get_template_part( 'content', get_post_type() ); ?> <div class="sharing"> <img class="img-sharing" src="your image url here"> </div> <?php getnoticed_content_nav( 'nav-below' ); ?> <?php if ( ! getnoticed_option('nuke-comments') ) { // If comments are open or we have at least one comment, load up the comment template if ( comments_open() || '0' != get_comments_number() ) { get_template_part( 'comments-pre' ); comments_template( '', true ); } } ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary .site-content --> <?php get_sidebar(); ?> <?php get_footer(); ?>
Let me know how it works!
I actually tried that when I was waiting for you and did not work.
This is what it’s doing:
https://www.dustinmaherg.com/2016/01/what-i-learned-from-a-multi-millionaire/
Placing it under the white post box besides about the bar.
above* the bar
?? thank you for trying. Any other ideas? I went digging in other templates but could not figure it out.
I see, I think you′ll have to customize content.php or content-post.php
I′m not sure because I can′t see the files ??uhhhhhhh lol let me see if can figure it out. I had no idea where to look so your direction is a start.
- The topic ‘How do I insert an image above my bottom share bar on all post?’ is closed to new replies.