Jump to content

Archived

This topic is now archived and is closed to further replies.

Claude203

Where to add a ShareThis bar or other social bar to posts and home page summaries?

Recommended Posts

Claude203

I would like to add this just below the post excerpt for each blog post, both in the single post appearance and in each of the post summaries listed on the main blog page. But where does it go? I cannot find the _posts or post_template that used to exist in the old WhiteHousePro.

 

<!-- ShareThis Button BEGIN -->
<span class='st_fblike_hcount' st_url='<?php the_permalink() ?>' displayText=‘FB Like'></span>
<span class='st_twitter_hcount' st_url='<?php the_permalink() ?>' displayText='Tweet'></span>
<span class='st_facebook_hcount' st_url='<?php the_permalink() ?>' displayText='Share It'></span>
<span class='st_pinterest_hcount' st_url='<?php the_permalink() ?>' displayText='Pin It'></span>
<span class='st_linkedin_hcount' st_url='<?php the_permalink() ?>' displayText='LinkedIn'></span>
<span class='st_email_hcount' st_url='<?php the_permalink() ?>' displayText='Email'></span>
<!-- AddThis/ShareThis Button END -->

 

Screen shot attached of what it looks like.
 

Thank you.


Claude Johnson
BlackFives.org

Share this post


Link to post
Share on other sites
Claude203

Cool. I'll take a look and try it. Thanks.


Claude Johnson
BlackFives.org

Share this post


Link to post
Share on other sites
Claude203

Thanks for that link for instructions on how to use hooks. However, that tutorial is incomplete. It says that all hooks are added to the functions.php file, but that file does not exist in WHP6 (nor in the old WHP).  

 

I simply would like to know where I can add code so that it appears on every post and/or page. Thank you.


Claude Johnson
BlackFives.org

Share this post


Link to post
Share on other sites
Claude203

I believe I solved by simply using the ShareThis plugin, which allows the placement of a social bar just below the post title and post meta bar. I'm not sure about AddThis but it may work the same way. The new WHP6/DMS2 seems more compatible with ShareThis than the told WHP, or maybe ShareThis just evolved, but either way it seems like an OK solution for now. 


Claude Johnson
BlackFives.org

Share this post


Link to post
Share on other sites
Danny

Cool. In regards to your question above, in order to add that code you will need to use a child theme. You can make one yourself for WhiteHouse Pro, the child theme will include a functions.php file, then you add your hook code there.

 

You're free to use my DMS skeleton child theme as a base - http://dannyholt.github.io/skeleton


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Justin Taylor
      By Justin Taylor
      I am using a child theme (the pl-starter-theme-master) and have added the following custom function to the child functions.php file:
      // Add AddThis share code to blog posts add_action('pagelines_loop_before_post_content', 'add_addthis_share_code'); function add_addthis_share_code() { echo"<div class=\"addthis_sharing_toolbox\"></div> "; } It isn't do anything. Can someone see why?
    • anislagan
      By anislagan+
      Hi,
       
      I have tried modifying the slider using CSS but so far have a hard time doing so.
       
      Is there a quick css property that I can modify to increase and decrease the default height?
       
      Thanks,
      Jorge
    • anislagan
      By anislagan+
      Hi there,
       
      How do you change the default color for whitehouse pro slider left pane (see that attached image)?
       
      Thanks,
      Jorge
    • bcarney
      By bcarney
      I'm using WhiteHousePro6 for my site, and all the pages have that nice light gray background color - except for one section in the Posts pages.  Where the actual post page is displayed, it's white.  I'd like to make it the same matching gray background.  How do I go about this?
    • vanessabt
      By vanessabt+
      Hello,
       
      I need some help. I was almost finished designing a site for a client last night on my local drive when I was adding some stuff to sections that were already present and when I saved it deleted other sections and the section won't render not in the editor where i want to put it.  I thought it was just my local drive so I created a subdomain as a demo site and transferred the site, but I am still having the problem.
       
      I don't want to touch any more pages in case I lose all the sections again.
       
      here is the site http://otapdemo.1201llc.com/.  I am trying to make the home page looks like the "who we work with page" by using the pl next box on the right and then a coding the facebook feed in the pl next box under the image.
      but the pl next box won't stay there.  It will show in the editor but either moves the content if you look at it not in the editor or it doesn't show up!  i also had 3 media boxes under those main sections that had clickable images that changed images when you hovered over them and they disappeared as well.
       
      when i try to add a section on the homepage it duplicates.  I am pretty much at my breaking point with this as I have spent a lot of hours and have been pretty frustrated. Not sure if it this theme or dms.  I used whitehousepro6 theme this time because it had the look and functionality in the slider pieces that I wanted. And I thought it would be easier just to build this simple site and use a little customization that way.
       
      But i had to customize the navigation and still can't figure out how to get the blue lines to go away.  In additions I will be putting in a custom footer (which was already there but also disappeared!)
       
      here is the original site we built on our platform http://www.noapebble.com/pebble-061/and we are moving it because our platform is not user friendly for the client to go in and change content.  but the home page you see there is exactly what my home page looked like on pagelines. except all my section areas keep getting pushed out and deleted.  
       
      The other problem I had was that I tried to upload my cloud background but depend on the length of the page it ended up just stretching and distorting the background image... still trying to figure out how to deal with that as well.
       
      PLEASE HELP!
×