Syahir Hakim
KeymasterKuala Lumpur, Malaysia
When not perched on my workspace, I tremendously enjoy hiking in the bushes and climbing mountains. They serve as much-needed refuges from the pretense of cities.
Forum Replies Created
-
Admin
dezmonde,
This is a separate issue, so please post in a new topic next time. I’ve done this for you this time.
As for your issue, take a look here: https://forum.graphene-theme.com/graphene-support/diaporama-bug
Admin
It’s even easier than that. Just go to WP Admin > Appearance > Graphene Mobile > Comments Options and select “Disabled for pages”.
Admin
Hi Kat_Rocha and MiSyMa,
Please follow the steps outlined here: https://forum.graphene-theme.com/graphene-support/no-content-on-the-home-page#post-8181
Admin
No, that function would not be displayed anywhere at all, since the
add_action()function will never be executed unless you explicitly call thejosh_followme()function.You should do it like this instead:
function josh_followme(){
if ( !is_home() ){
?>
<div id="followme"><img src="http://www.joshlobe.com/wp-content/images/follow.png"></div>
<?php
}
}
add_action( 'graphene_feed_icon', 'josh_followme' );Note that the
add_action()function does not execute thejosh_followme()function when it is called. It merely places the function into the function queue, so that when thegraphene_feed_iconaction is run, then those functions in the queue will be executed. And by the timegraphene_feed_iconaction is run, WordPress will already know what page it is serving, hence theis_home()conditional will work as intended.As for the exclamation point, that is a PHP syntax (commonly used by other programming languages as well) to denote
NOT. So for example, ifis_home()returnstrue, putting! is_home()will evaluate toNOT true, meaning false.Also, make sure you know the difference between
is_home(), which is for the posts listing page, andis_front_page(), which is for the site’s front page regardless of whether or not it’s a posts listing page or a static front page.Admin
Glad to know 🙂
Admin
You’re welcome, Nick!
Admin
OK, try replacing these files now:
functions.php
http://code.google.com/p/graphene/source/browse/branches/1.5.3/functions.php?spec=svn229&r=229
comments.php
http://code.google.com/p/graphene/source/browse/branches/1.5.3/comments.php?spec=svn229&r=229
style.css
http://code.google.com/p/graphene/source/browse/branches/1.5.3/style.css?spec=svn229&r=229
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.Admin
That profile image is your Gravatar. Change it there and it’ll change here.
Admin
Quote:my suggestion is to create a separate sprite (stored in the child theme folder) for all your changed images and reference it from your child theme stylesheet. This does not get overwritten by an update.Agreed. And if you’re just changing one image, you don’t even need a new sprite image. Instead, just overwrite the CSS so that that elements point to the new image instead of the theme’s sprite image. Just because the theme uses sprites, doesn’t mean you must to, particularly if you’re just changing one image.
