Search Results for 'Show social sharing buttons'
-
Is there a way to make the social sharing buttons show up on the secondary menu bar ONLY on the home page?
So this is my code:
<!– standard button–>
<span class=”st_fblike_hcount” ></span>
<span class=”st_facebook”></span>
<span class=”st_twitter”></span>
<span class=”st_linkedin”></span>
<span class=”st_stumbleupon”></span>
<span class=”st_email” ></span>
<span class=”st_sharethis”></span>
<script type=”text/javascript” src=”http://w.sharethis.com/button/buttons.js”></script>
<script type=”text/javascript”>
stLight.options({
publisher:’wp.48f508c4-0b75-4c89-a79f-1d00814f82e7′
});
</script>
I want it to appear to the far right of the About Laura / juicyhotels.com menu items on the secondary menu bar. How would I do this? I don’t want it in that spot on any page other than the home page.
Thanks in advance!
Laura
-
Hi Rick,
I use Addthis plugin for my some of my social sharing and it shows on the home page. I use the graphene theme social sharing option for my facebook sharing and it doesn’t show on the homepage. you have to open the article for you to see that. So I guess you can use Addthis to show social sharing links on your homepage
I hope you find this bit of information helpful.
Best regards
-
Mod
Just found a page which uses Graphene and does show sharing buttons on the front page here. Be sure to post that URL!
-
Syahir,
just seeing your reply! Thanks for taking the time to reply. I finally was able to get the insert the right code in the the theme’s social sharing option and the XFBML version is working! The send button doesn’t work with mozilla for a reason i dont know but works just fine in chrome.
So the XFBML like works just fine with the theme.
Was thinking on how to change the position of the facebook sharing buttons from below the post to just above the addthis buttons but have not been able to figure out how to do it.
thank you once again for the great support
-
Would the same rules apply to the loop.php and footer.php files as do to the functions.php file that you mentioned above (don’t add it all, just what I customize). If so, since my customizations in the loop.php are moving the location of the top social share buttons, and in the footer it’s adding a custom menu, how would I do that?
Here’s my customizations (areas affected shown since that’s all I’ve changed):
Loop.php File Changes
Notice I’ve marked where the new location is as well as where the original location was, just for my future reference.
<?php /* Post content */ ?>
<!-- SOCIAL SHARING TEST LOCATION START -->
<div id="socialsharing">
<?php /* Social sharing buttons at top of post */ ?>
<?php if (stripos($graphene_settings['addthis_location'], 'top') !== false) {graphene_addthis(get_the_ID());} ?>
</div>
<!-- SOCIAL SHARING TEST LOCATION END -->
<div class="entry-content clearfix">
<?php do_action('graphene_before_post_content'); ?>
<?php if ((is_home() && !$graphene_settings['posts_show_excerpt']) || is_singular() || (!is_singular() && !is_home() && $graphene_settings['archive_full_content'])) : ?>
<!-- SOCIAL SHARING ORIGINAL LOCATION -->
<?php /* The full content */ ?>
<?php the_content('<span class="block-button">'.__('Read the rest of this entry »','graphene').'</span>'); ?>
<?php else : ?>
<?php /* The post thumbnail */
if (has_post_thumbnail(get_the_ID())) { ?>
<div class="excerpt-thumb">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__('Permalink to %s', 'graphene'), the_title_attribute('echo=0')); ?>">
<?php the_post_thumbnail(apply_filters('graphene_excerpt_thumbnail_size', 'thumbnail')); ?>
</a>
</div>
<?php
} else {
echo graphene_get_post_image(get_the_ID(), apply_filters('graphene_excerpt_thumbnail_size', 'thumbnail'), 'excerpt');
}
?>Footer.php Changes
As with above, I’ve marked the beginning and end of what I’ve added.
<?php if ( ! $graphene_settings['hide_return_top'] ) : ?>
<li class="menu-item return-top"><a href="#"><?php _e('Return to top', 'graphene'); ?></a></li>
<?php endif; ?>
<!--ADDED BY JOHN START -->
<li><a href="#">Control Panel</a>
<ul class="sub-menu"><li><?php wp_register(); ?></li>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
<!--LINK TO HOW TO VIDEOS FOR ADMINS ONLY-->
<?php global $user_ID; if( $user_ID ) : ?>
<?php if( current_user_can('level_10') ) : ?>
<li><a href="http://www.greggcountygop.com/howto/">Instructional Videos</a></li>
<?php endif; ?>
<?php endif; ?>
<!--END LINK TO HOW TO VIDEOS FOR ADMINS ONLY--></ul></li>
<!--ADDED BY JOHN END -->
</ul>
</div>
<div id="developer">
<p>
<?php /* translators: %1$s is the link to WordPress.org, %2$s is the theme's name */ ?>
<?php printf(__('Powered by %1$s and the %2$s.', 'graphene'), '<a href="http://wordpress.org/">WordPress</a>', '<a href="http://www.khairul-syahir.com/wordpress-dev/graphene-theme">' . __('Graphene Theme', 'graphene') . '</a>'); ?><br />Customized by <a href="http://www.jrothraministries.com>" target="_blank">John L. Rothra</a>.
</p>
<?php do_action('graphene_developer'); ?>
</div>In case you’re wondering why I have the code to limit a link to Admins only, I do have a plugin that will block a page or post to people unless they are logged in as a Admins. However, I don’t want the link to that page showing up at all unless the person is logged in as an admin. Whether the link was put in the regular menus or added to the Meta widget, it would be visible to anyone who logs in regardless of their level. I wanted to hide the link from anyone except admins, hence this coding.
-
Okay, I’m missing something. In the “themes” directory, I created a folder called “graphene-child-byJLR” and put the following files in it:
– loop.php (because I moved where the top social sharing buttons go)
– style.css
– images/sprite_h-JLR.png (changed some of the colors)
– images/sprite_h_light-JLR.png (changed some of the colors)
Here’s what that CSS file has in it:
/*
Theme Name: Graphene Child
Theme URI: http://www.khairul-syahir.com/wordpress-dev/graphene-theme
Description: Child theme for the Graphene theme
Author: John L. Rothra
Author URI: http://www.jrothraministries.com/
Template: Graphene Custom by John L. Rothra
Version: 1.0
*/
@import url("../graphene/style.css");
/* =Non-classed HTML elements
*/
body {
background: url(images/bg-red-gradiant.png) repeat-x #ae0101 fixed;
}
/* =Header
*/
#top-bar {
background: url(images/sprite_h-JLR.png) left -196px repeat-x #313130;
}
/* =Navigation
*/
.menu-bottom-shadow{
background: url(images/sprite_h-JLR.png) left top repeat-x #eee;
}
#header-menu {
background: url(images/sprite_h-JLR.png) left -3px repeat-x #101010;
}
#header-menu > li:hover,
#header-menu > li.current-menu-item,
#header-menu > li.current-menu-ancestor {
background: url(images/sprite_h-JLR.png) left -100px repeat-x #eee;
}
#header-menu ul li {
background: url(images/sprite_h-JLR.png) left -377px repeat-x #dfdfdf;
}
#secondary-menu {
width: 100%;
background: url(images/sprite_h-JLR.png) left -540px repeat-x #222;
}
#secondary-menu > li:hover,
#secondary-menu > li.current-menu-item,
#secondary-menu > li.current-menu-ancestor {
background: url(images/sprite_h-JLR.png) left -614px repeat-x #dfdfdf;
}
#secondary-menu ul li {
background: url(images/sprite_h-JLR.png) left -614px repeat-x #dfdfdf;
}
/* =Content Area
*/
.post-title,
.post-title a,
.post-title a:visited {
font: 24px arial;
}
blockquote p {
color: #1a1a1a !important;
}
/* =Post Formats
*/
.post-format .entry-header{
background: url(images/sprite_h-JLR.png) left -261px repeat-x #598ead;
}
/* =Footer
*/
#footer {
background: url(images/sprite_h-JLR.png) left -952px repeat-x #0a273f;
}
.footer-menu-wrap ul.sub-menu {
border-left: 1px solid #222;
}I only slightly modified the file names for my own easier reference to the original.
** The Problem **
When I refreshed the templates screen in WP to be able to activate the child theme, it is not listed at all, but FileZilla shows that the files are there. I even tried logging out and logging back in. What did I do wrong?
**** EDIT ****
I found the problem, I think. Re-reading the WP page to which you link in the OP, I have the wrong name under “Template.” Oops.
-
I just want to make sure I understand things right since I’m new to the ‘child theme’ concept. To customize the theme:
1. Create a new theme directory within the “wp-content/themes” directory, call it whatever I want (e.g., Graphene-edited).
2. Place the CSS file in there with the stuff you mentioned in the first post.
3. Anything I want to change in the original CSS, add it to the new ‘child’ CSS.
4. If I change the sprite images, call give them a new name (e.g., sprite-master-edited.png) and add the appropriate css calls in the new child CSS file.
5. Activate the child theme.
But I’m still confused on two things: First regarding certain files, such as the “loop.php” file. I moved the location of where the top social sharing icons will be placed. It now looks like this:
<?php /* Post content */ ?>
<!-- SOCIAL SHARING TEST LOCATION START -->
<div id="socialsharing">
<?php /* Social sharing buttons at top of post */ ?>
<?php if (stripos($graphene_settings['addthis_location'], 'top') !== false) {graphene_addthis(get_the_ID());} ?>
</div>
<!-- SOCIAL SHARING TEST LOCATION END -->
<div class="entry-content clearfix">
<?php do_action('graphene_before_post_content'); ?>
<?php if ((is_home() && !$graphene_settings['posts_show_excerpt']) || is_singular() || (!is_singular() && !is_home() && $graphene_settings['archive_full_content'])) : ?>
<!-- SOCIAL SHARING ORIGINAL LOCATION -->
<?php /* The full content */ ?>Do I create a “loop.php” file in the child theme directory in the same place the original one would respectively go?
Second thing I’m confused about: if I update the theme (when updates come), will this impact the child files such as the loop.php file?
-
I have experienced this same problem when I reinstalled a theme on my page and the social network sharing buttons had gone. I had the set up as a minimizing side bad on the side with just a small button showing all the time.
If you have encountered the problem, you might want to re-install the old settings back and take note of what has to be changed in order for it to work. You might have problems with the share function after but that would easily be fixed as well.
-
Admin
For the social sharing buttons in posts, you need to use the codes provided from the service providers, such as those from AddThis.
-
For some reason the Facebook like buttons are off center from the others. Here’s what it looks like (site’s new look isn’t ‘live’ yet, hence no link to it):

In the template’s options section, under “Social Sharing Buttons” I put:
Code:<div id=”fb-root”></div><script src=”http://connect.facebook.net/en_US/all.js#appId=235939013107755&xfbml=1″></script><fb:like href=”” send=”true” layout=”button_count” width=”90″ show_faces=”false” font=””></fb:like>
Tweet<script type=”text/javascript” src=”http://platform.twitter.com/widgets.js”></script>
<g:plusone size=”medium”></g:plusone>I though it might be due to the
Code:<div id=”fb-root”></div>line, but when I remove that, the FB buttons don’t show up at all. I tried going into the CSS and telling “.add-this-right” to vertically put everything in the middle, but that didn’t fix it. Any thoughts?
