Forum Replies Created
-
Yes! That is exactly what I am playing with now and it’s perfect.
Thanks…great minds think alike 😉
Thank you!
However I’m not even sure that page will stay there or how I want to do the home page yet. I’m just now digging into options for home page layout.
That is there by way of appearances > graphene options > social sharing turned on.
Using code
<span style="vertical-align:middle;"class="st_fblike"></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>
'
And css style}
.add-this-right {
float: right;
margin-top:-60px;
margin-bottom:10px;
margin-left:20px;
}
`
Any way in all that to tell it !if front page don’t show up? Maybe in functions?
Hey! That did it! I used your last bit of code from that thread..I guess it was a bit different…
function laura_sharethis (){
if(!(is_front_page())){
?>
<div id="sharethis"><span class='st_twitter_hcount' displayText='Tweet'></span><span class='st_facebook_hcount' displayText='Facebook'></span><span class='st_fblike_hcount' ></span><span class='st_plusone_hcount' ></span></div>
<?php
}
}
add_action( 'graphene_after_post_content', 'laura_sharethis' );And now voila, not on the home page but is on the other pages…great!!
NOW…last thing of that then is to figure out the top right ones.
The Graphene ones. Smaller ones…
Well it did take the bottom ones off the front page, but it also removed them on all pages…
Can you check my php tags? I got a code hinting error in DW so maybe it goofed up a php tag further down…?
<?php
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'View full post' => 'Read More',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
function laura_sharethis (){
if (!is_front_page()) {
?>
<div id="sharethis"><span class='st_facebook_hcount' displayText='Facebook'></span><span class='st_twitter_hcount' displayText='Tweet'></span><span class='st_plusone_hcount'></span><span class='st_fblike_hcount'></span></div>
<?php
}
add_action( 'graphene_after_post_content', 'laura_sharethis' );
/******
* these next two remove the graphene breadcrumb and then add one
* which does not appear on the home page
*****/
// has to be called after the action is added
add_action ('after_setup_theme', 'wmrt_remove_graphene_bc');
function wmrt_remove_graphene_bc() {
remove_action ('graphene_top_content', 'graphene_breadcrumb_navxt');
}
add_action('graphene_top_content', 'wmrt_breadcrumb_navxt');
function wmrt_breadcrumb_navxt () {
//by calling this at this point is_home() works!
if ((function_exists('bcn_display')) && (!(is_front_page()))) {
echo '<div class="breadcrumb">';
bcn_display();
echo '</div>';
}
}
}Hey good point…Ill try it!
Done 🙂
I just had to add a second text widget in the header area with the same date code, but then tell it in the widget logic box:
!is_front_page()
(thanks for the tip about ! meaning not!)
Then give that a new style, text5 in the styles sheet…move the margin and now it shows up where I want on pages other than the home page.
Yeay! Thanks for the help.
Ha, I think I’ve just about gotten it 🙂
moment…
Ok so now I have the date only showing on the home page.
SO I just need to know for the widget logic how to make it the opposite of
is_front_page ()
how do I make that say “is not front page”?
