Pages?
-
Well, you can re-position it with css to wherever you like. I just think the footer is an easier hook to keep of the homepage than the after content. (although I have no idea)
That is, if the function does what it’s supposed to. That’s what I want to know.
But, if you keep it in the after content… your function should look exactly like this:
function laura_sharethis (){
if (!is_home()) {
?>
<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' );You’re right. If you position it from the footer, it’s always going to show up in the same spot… regardless of the post width.
Scratch the footer idea 🙂
Once more… let’s try this one if the above doesn’t work.
function laura_sharethis (){
if(!(is_home())){
?>
<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' );Nope, same. Let’s leave it. I know you have your own long list of stuff.
I’m going to give some more thought to how I actually want the home page to be.
Thanks 🙂
I’m also still banging my head against the ambrosite plug in. It’s making me nuts. I can’t get them to work together and I know it has something to do with the function in my functions file for the post plug in.
Okay. I’m gonna leave this thread alone. I’ll switch to your other thread about the navigation. We are leaving this thread with this question:
1. How do you get content to display either ONLY on the home page, or NEVER on the home page.
Admin
If you could give a gist of the discussions in this thread, that would be helpful. Four pages of discussion is just too long…
Apologies Syahir,
I believe we have figured it out.
A lot of this thread was just tweaking a specific plugin…. however, one question remains when using created functions inserted into the child functions.php.
For instance, if we have this function in our child..
function josh_followme(){
?>
<div id="followme"><img src="http://www.joshlobe.com/wp-content/images/follow.png"></div>
<?php
}
add_action( 'graphene_feed_icon', 'josh_followme' );I know there are “if” statements we can use to control which pages it will show on. We tried using
if (!is_home()) {to keep it from showing on the front page. After further experimentation, we usedif (!is_front_page()) {to keep from showing on the home page, but showing on all other pages.I was wondering where we can find these
is_homeandis_front_pageattributes.Admin
By attributes do you mean a documentation for those functions? If yes, you can find them here:
http://codex.wordpress.org/Function_Reference/is_front_page
http://codex.wordpress.org/Function_Reference/is_home
Also, note that when using the conditional functions like
is_home()andis_front_page()in thefunctions.phpfile, keep in mind that thefunctions.phpfile is executed way ahead of the other query processing that determine which page to display in your site.Meaning that if you use those conditionals like this:
function josh_followme(){
?>
<div id="followme"><img src="http://www.joshlobe.com/wp-content/images/follow.png"></div>
<?php
}
if ( is_home() ){
add_action( 'graphene_feed_icon', 'josh_followme' );
}It will not work because
is_home()then will always return false, because at the time when that code is executed WordPress doesn’t know yet what page it will be serving.
- You must be logged in to reply to this topic.
