I've tried adding that code to the php file but after i save the changes the editor fails to complete loading and so does not even show that the php file was saved successfully.
It appears the changes are causing problems because the wordpress dashboard, the page and the entire website doesn't load but just shows a blank page.
I had to undo the changes via FTP
I simply pasted the code into the php file and added // before it because it seemed everything on the file started with it.
This is what the file looked like code is in Blue,
<?php
// Start the engine
require_once(TEMPLATEPATH.'/lib/init.php');
// Child theme library
require_once(CHILD_DIR.'/lib/custom-header.php');
require(CHILD_DIR.'/lib/style.php');
// Child theme (do not remove)
define('CHILD_THEME_NAME', 'Lifestyle Theme');
define('CHILD_THEME_URL', 'http://www.studiopress.com/themes/lifestyle');
// Add support for custom background
if ( function_exists('add_custom_background') ) {
add_custom_background();
}
// Add new image sizes
add_image_size('Mini Square', 70, 70, TRUE);
add_image_size('Square', 110, 110, TRUE);
// Force layout on homepage
add_filter('genesis_pre_get_option_site_layout', 'lifestyle_home_layout');
function lifestyle_home_layout($opt) {
if ( is_home() )
$opt = 'content-sidebar';
return $opt;
}
// Add advertising code after single post
add_action('genesis_after_post_content', 'lifestyle_include_adsense', 9);
function lifestyle_include_adsense() {
if ( is_single() )
require(CHILD_DIR.'/adsense.php');
}
// Add two sidebars underneath the primary sidebar
add_action('genesis_after_sidebar_widget_area', 'lifestyle_include_bottom_sidebars');
function lifestyle_include_bottom_sidebars() {
require(CHILD_DIR.'/sidebar-bottom.php');
}
// Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );
// Customize the footer section
add_filter('genesis_footer_creds_text', 'lifestyle_footer_creds_text');
function lifestyle_footer_creds_text($creds) {
$creds = __('Copyright', 'genesis') . ' [footer_copyright] [footer_childtheme_link] '. __('on', 'lifestyle') .' [footer_genesis_link] · [footer_wordpress_link] · [footer_loginout]';
return $creds;
}
// function field_func($atts) {
global $post;
$name = $atts['name'];
if (empty($name)) return;
return get_post_meta($post->ID, $name, true);
}
add_shortcode('field', 'field_func');
// Register widget areas
genesis_register_sidebar(array(
'name'=>'Sidebar Bottom Left',
'id' => 'sidebar-bottom-left',
'description' => 'This is the bottom left column in the sidebar.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Sidebar Bottom Right',
'id' => 'sidebar-bottom-right',
'description' => 'This is the bottom right column in the sidebar.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Featured Top Left',
'id' => 'featured-top-left',
'description' => 'This is the featured top left column of the homepage.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Featured Top Right',
'id' => 'featured-top-right',
'description' => 'This is the featured top right column of the homepage.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Featured Bottom',
'id' => 'featured-bottom',
'description' => 'This is the featured bottom section of the homepage.',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
|