Tagged: ajax, html, social share
-
AuthorPosts
-
July 9, 2013 at 1:28 pm #25950
Hi Guys,
I tried to add the html code for social share btns from addthis.com to the portfolio section of my site, but when you try and switch to Ajax view, the pages break, I wondered if this was due to the <div> code?.
Thanks
July 10, 2013 at 3:32 am #128760Hi Gstar72,
We would need to see the implementation live and inspect the code. If you could also provide a sample of what you are adding in that would help too.
Regards,
Devin
July 10, 2013 at 5:11 pm #128761Hi Devin
addthis html is as follows:
<div class=”addthis_toolbox addthis_default_style “>
<script type=”text/javascript” src=”http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4f07a4da3532511e”></script>
</div>
When you add this to the portfolio and then select to view the portfolio in Ajax format, the thumbnail previews do not load, so you cannot access the page. I tried adding the addthis widget – its a big shit sandwich, as I don;t want sidebars..
Can you see any solution?. Thanks mate.
July 11, 2013 at 4:13 am #128762Hi,
First go to the Add this plugin dashboard. Settings > Addthis Share. Fill in the AddThis Profile ID: then login using your Addthis account. Get the Addthis API code on your actual addthis account. Sign in here: https://www.addthis.com/login
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_pinterest_pinit"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51de2d2b7e09a8f5"></script>
<!-- AddThis Button END -->Edit wp-contentthemesenfoldconfig-templatebuilderavia-shortcodes > portfolio.php, find this code.
$output .= "<h2 class='portfolio-preview-title'><a href='{$link}'>".$entry->post_title."</a></h2>";
Below, add the addthis api code with some modifications.
$output .= '<!-- AddThis Button BEGIN -->';
$output .= '<div class="addthis_toolbox addthis_default_style ">';
$output .= '<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a';
$output .= '<a class="addthis_button_tweet"></a>';
$output .= '<a class="addthis_button_pinterest_pinit"></a>';
$output .= '<a class="addthis_counter addthis_pill_style"></a>';
$output .= '</div>';
$output .= '<!-- AddThis Button END -->';After that, open footer.php, find this code
<a href='#top' id='scroll-top-link' class='avia-font-entypo-fontello'></a>
Below, add the addthis javascript code with your unique profile id. It will look something like this.
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51de2d2b7e09a8f5"></script>We got the code from the original API code.
If you successfully did the instructions above, you will have the addthis button below the portfolio title.
Regards,
Ismael
August 1, 2013 at 2:41 am #128763Hi Ismael,
Sorry its been so long since I replied, too much going on….
I opted to not use the ajax portfolio in the end, due to a few issues. Woul the above code add the add this share to my portfolio without any issues?-
Thanks for your help guys, you are great!
Gary
August 3, 2013 at 6:21 am #128764Hi!
Yes it should work. You can also try a social bookmarks plugin ( https://kriesi.at/support/topic/looking-for-recommendation-on-swyn-plugin )
Regards,
Peter
August 12, 2013 at 9:13 pm #128765Hi Guys
I tried all of the above with either no luck, or bugs. I ended up installing the Addthis plugin, selecting the all in one pill, then copying the code from Firebug and pasting where I wanted within the page, seems to have done the trick. Just trying to figure out how to integrate this code into the lightbox / gallery popup:
Hope this helps someone else?.
Gary
August 14, 2013 at 12:33 am #128766Hi Gary,
As far as I know prettyPhoto doesn’t have support for that. It has support for twitter and facebook which can be enabled by following Peter’s advice here: https://kriesi.at/support/topic/gallery-social-share#post-131052
Regards,
Devin
-
AuthorPosts
- The topic ‘addthis Social Share html’ is closed to new replies.