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
There’s really no need to change the sprite file if you’re just changing the buttons. Just create a new image file or a new sprite for those buttons, and then use CSS to apply the new background to those buttons.
Admin
In reply to: Re: Incompatible Archive error when trying to update
October 13, 2011 at 1:10 am #16839Try downloading again. Sometimes it’s just that the temporary download key (not your API key) has expired, hence the error. Make sure also to enter your API key in the theme’s settings though.
Admin
In reply to: NEXTGen Gallery thumbnails "smushed" when inserted onto page.
October 13, 2011 at 1:08 am #14484Which one of the image in that page is the featured image?
Admin
Here’s how to edit the individual strings without editing the theme’s code: https://forum.graphene-theme.com/graphene-support/how-to-change-follow-me-text-on-twitter-widget#post-6298
Admin
That’s because of this code:
// If this is not the widget area we want to change, don't do anything
if ( $sidebar['id'] != 'sidebar-widget-area' )
return;Remove that bit to have it applied to all widget areas.
Admin
Something like this will do it for your My Blogs widget:
#categories-5 .widget-title-icon {
background: url(http://www.joshlobe.com/wp-content/images/widget_categories.png) no-repeat;
display: block;
width: 28px;
height: 28px;
}Admin
Try following the instructions here: https://forum.graphene-theme.com/graphene-support/my-graphene-slider-picture-setup#post-4351
Admin
Always try to minimise code replacement as much as possible. The bigger the chunk of code you’re replacing, the higher the chances are that something in that big chunk of code will have changed in the next update.
If you just want to add an image placeholder to the left of the widget title, you can do something like this:
/**
* Modify the widget title to include an image placeholder
*/
function graphene_modify_widget_title( $sidebar ){
global $wp_registered_sidebars;
// If this is not the widget area we want to change, don't do anything
if ( $sidebar['id'] != 'sidebar-widget-area' )
return;
// Modify the title parameter
$sidebar['before_title'] = $sidebar['before_title'] . '<span class="widget-title-icon"></span>';
// Pass in the modified parameters to the registered sidebar array
$wp_registered_sidebars[$sidebar['id']] = $sidebar;
}
add_action( 'register_sidebar', 'graphene_modify_widget_title' );Note that what I have done above is to include an image placeholder in the form of
<span class="widget-title-icon"></span>. Since every widget on the site will have a unique ID, you can just use CSS to give different background images to that image placeholder for different widgets. No need to meddle with changing PHP codes anymore.Admin
You can stay with the current version for a while, since that’s a pretty stable release version. You just won’t get any of the new features that come with the new version.
But don’t hold off too long though. It’s easier to make the leap now than it will be when the theme is several releases ahead of the version you’re using.
Admin
For most functions, you can simply declare a new function in the child theme with the same function name. This applies to all functions which are wrapped in the
function_exists()conditional.For other functions that are not wrapped in the
function_exists()conditional, they are added using action hooks, so you can remove that function by usingremove_action( 'hook_name', 'function_name' )to remove the function. And then define your own function and hook it to the same action hook.
