Danny+ 1,327 Report post Posted July 6, 2011 Hi, Is it possible to display the Sharebar at the top of a post but underneath the post title aswell as its normal position underneath the post content ? Here is an example of what I mean: Post Title Post date, posted by ect... Sharebar Post content is here... Sharebar Comments Please search our forums, before posting! Share this post Link to post Share on other sites
catrina 103 Report post Posted July 7, 2011 You can try using a hook to place the sharebar at the top of the post. Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
Danny+ 1,327 Report post Posted July 7, 2011 Hi Catrina, Still learning the hooks side of things, could you possibly help me out please ? Danny Please search our forums, before posting! Share this post Link to post Share on other sites
Danny+ 1,327 Report post Posted July 7, 2011 OK I have been giving this a go and had no luck, just keeping getting errors on page refresh. The problem I am having is that I dont know what Im doing but also I am not sure what the function name is for the sharebar and what I should put after that? Here is what I have tried so far. add_action('pagelines_inside_top_theloop','sharebar'); function sharebar(){?> get_sharebar(); } So that doesnt work so can someone who knows what there doing give me a few pointers? Danny Please search our forums, before posting! Share this post Link to post Share on other sites
Danny+ 1,327 Report post Posted July 7, 2011 Ok I have got this working but its appearing above the page title, where I want it underneath the page title and meta data but above the main content. So is there a hook for that position as I cant find it. Please search our forums, before posting! Share this post Link to post Share on other sites
Simon 248 Report post Posted July 7, 2011 so, filter into `the_content` Share this post Link to post Share on other sites
Danny+ 1,327 Report post Posted July 7, 2011 Hi Simon, I have to be honest, I am a complete noobie when it comes to this kind of code Here is the code I have that is working, could you ammend it with the the_content please? Cheers Danny // SHAREBAR ABOVE MAINCONTENT--------// add_action('pagelines_inside_top_maincontent','sharebar'); function sharebar(){?> <?php is_single($post); ?> <div class="post-footer"> <div class="left"> <?php e_pagelines('post_footer_social_text', '');?> </div> <div class="right"> <?php $upermalink = urlencode(get_permalink()); $utitle = urlencode(get_the_title()); echo apply_filters( 'pagelines_before_sharebar', $sharepre ); // Hook ?> <?php if(pagelines_option('share_reddit')):?> &title=<?php echo urlencode( strip_tags(get_the_title($post->ID)) );?>" title="<?php _e('Share on','pagelines');?> Reddit" rel="nofollow" target="_blank">/ico-reddit.png" alt="Reddit" /> <?php endif;?> <?php if(pagelines_option('share_facebook')):?> &t=<?php echo urlencode( strip_tags(get_the_title($post->ID)) );?>" title="<?php _e('Share on','pagelines');?> Facebook" rel="nofollow" target="_blank">/ico-facebook.png" alt="Facebook" /> <?php endif;?> <?php if(pagelines_option('share_twitter')):?> <?php $title = get_the_title($post->ID);?> ID)); echo $turl;?>" title="<?php _e('Share on','pagelines');?> Twitter" rel="nofollow" target="_blank">/ico-twitter.png" alt="Twitter" /> <?php endif;?> <?php if(pagelines_option('share_delicious')):?> &title=<?php echo urlencode( strip_tags(get_the_title($post->ID)) );?>" title="<?php _e('Share on','pagelines');?> Delicious" rel="nofollow" target="_blank">/ico-del.png" alt="Delicious" /> <?php endif;?> <?php if(pagelines_option('share_mixx')):?> " title="<?php _e('Share on','pagelines');?> Mixx" rel="nofollow" target="_blank">/ico-mixx.png" alt="Mixx" /> <?php endif;?> <?php if(pagelines_option('share_stumbleupon')):?> &title=<?php echo urlencode( strip_tags(get_the_title($post->ID)) );?>" title="<?php _e('Share on','pagelines');?> StumbleUpon" rel="nofollow" target="_blank">/ico-stumble.png" alt="StumbleUpon" /> <?php endif;?> <?php if(pagelines_option('share_digg')):?> &title=<?php echo urlencode( strip_tags(get_the_title($post->ID)) );?>" title="<?php _e('Share on','pagelines');?> Digg" rel="nofollow" target="_blank">/ico-digg.png" alt="Digg" /> <?php endif; echo apply_filters( 'pagelines_after_sharebar', $sharepost ); // Hook ?> </div> <div class="clear"></div> </div> <?php } Please search our forums, before posting! Share this post Link to post Share on other sites
Simon 248 Report post Posted July 7, 2011 try `pagelines_loop_before_post_content` for you action Share this post Link to post Share on other sites
Danny+ 1,327 Report post Posted July 7, 2011 AwesomeSauce Simon. Thank you Please search our forums, before posting! Share this post Link to post Share on other sites