Return to Support

AddThis code on the front page of the site?

Home Forums Graphene WordPress theme Support AddThis code on the front page of the site?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2905
    Anonymous

    Hi, I’d like to have my AddThis button code show up on the front page of my site, not just once someone drills down into a particular post. I searched the forums and found this (now-closed) thread on the same subject:

    https://forum.graphene-theme.com/graphene-support/show-social-sharing-button-on-latest-posts-front-page

    I updated the theme and noted the verbiage about the([#post-url] and [#post-title])tags on the options screen, but I’m not sure exactly how to implement this.

    Any idea how I can get the buttons to display on the front page?

    Thanks,

    -Ben

    #22555
    Josh
    Member

    You can add a text widget area and paste your code there. Or you can use an action hook. Where exactly do you want them displayed on the front page?

    #22556
    benzilla
    Member

    Thanks so much for the quick reply, Josh. I thought text widgets were just for the sidebar and I’m not familiar with action hooks, but I’ll look into both this weekend.

    I’d just want the buttons displayed in exactly the same place that Graphene currently displays them once posts are drilled into: either the top or bottom of the post content.

    Thanks again,

    -B.

    #22557

    Action hook tutorial is here:

    http://blog.kjodle.net/2011/11/04/graphene-action-hook-widgets-an-easy-way-to-modify-your-blog/

    I think you’ll find that easy to do, although it might take a couple of tries to get it right.

    Please note, however, that social sharing buttons inevitably link to the page they appear on. So if all your posts or excerpts on your front page show social sharing buttons, clinking on them will create a link to your front page, not to the post they originate from.

    You’ll need to use the AddThis API to explicitly define the URL, Title, and Description of the page the buttons are sharing, regardless of on which page the button is placed: http://www.addthis.com/help/url-and-title

    #22558
    benzilla
    Member

    Thanks for the action hook tutorial. I think that’s one I saw when I was Googling around earlier today. Will I be able to use [#post-url] and [#post-title] to define the title and URL with the AddThis API?

    #22559

    I really have no idea. I use AddThis code out of the box. I don’t use social sharing buttons on my front page or excerpt pages for two reasons:

    1. That is really valuable real estate and I want to fill it with my content.

    2. I want people to actually read what I write and think about it before they share it.

    But if you figure it out, feel free to share it. A lot of other people would like to know how, I bet.

    (Love you site, btw.)

    Cheers

    #22560
    benzilla
    Member

    Thanks, Kenneth – I’m starting to wonder if this is too time-intensive for me to get into, but if I decide to tackle it and actually manage to get it to work, I’ll for sure do a post about it. I think this is something that probably affects people who post visual art more than people who post writing; if you post writing, the reader *has to* drill into the post in order to read the whole article, but with a site like mine, people can just browse the front page of the site and really don’t need to drill into anything.

    I’m a bit surprised this is so involved. Clearly WP “knows” the URL and title of each post as it populates the front page. I’d think it’d be easy to therefore pull the post title and URL and use those to actively generate the AddThis code for each entry on the homepage.

    Anyway, thanks for the help (and the kind words about my site). I’ll pop back in if I dig into this and get it to work.

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

You must be logged in to reply to this topic.