Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Editing theme images
Clone this wiki locally
Say you have a theme template file with an image in it. It's really difficult to allow users to change that image without editing the file.
Fortunately, Front-end Editor offers a solution. Replace something like this:
<img src="<?php bloginfo('template_url'); ?>/images/header_1.jpg" width="970" height="140" alt="<?php bloginfo('name'); ?> header image 1" title="<?php bloginfo('name'); ?> header image 1" />
<?php editable_image( 'header-1', get_bloginfo('template_url') . '/images/header_1.jpg', array( 'width' => 970, 'height' => 140, 'alt' => get_bloginfo('name') ) ); ?>
Now, users will be able to click the Edit button and replace that image with another one from the media library.