Wp Navi not working?
-
Ok, I haven’t used the header widget area, so I’m not real familiar with the layout of the code.
I use the action hooks and the functions. But I haven’t run into a situation where I’ve had to position it differently depending on other elements. It IS possible, but it will take some tweaking.
I have a “date” with my daughter tonight… so I’ll be back on later tonight.
Keep at it, and I’ll expect a full update when I return 🙂
Check this post for reference…
http://diythemes.com/thesis/wordpress-conditional-tags/
Note: This is for the thesis theme… NOT graphene.
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.
Great!! Yeah, it works like a charm. Good tip to know about the exclamation point.
So, I was thinking this might work for your function code about the sharing icons toward the bottom of the text… the one that was displaying on the home page also.
I was using
is_homeinstead ofis_front_page. So, if you add!is_front_page()to your function code, that might prevent it from showing on the home page also.Just a thought…
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! 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…
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?
- You must be logged in to reply to this topic.
