OK – I did the following:
– By FTP, I went to the theme directory and downloaded functions.php.
– I add the lines(Of course my web site replace example) as below:
<?php
update_option('siteurl','https://example.com');
update_option('home','https://example.com');
// Registers the Widgets and Sidebars for the site
function skt_widgets_init() {
register_sidebar(array(
'name' => 'blog-sidebar-area',
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
));
register_sidebar(array(
'name' => 'footer-first-sidebar-area',
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
));
register_sidebar(array(
'name' => 'footer-second-sidebar-area',
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
));
register_sidebar(array(
'name' => 'footer-third-sidebar-area',
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
));
}
add_action( 'widgets_init', 'skt_widgets_init' );
/***************register nav menus*********************/
register_nav_menus( array(
'Header' => __( 'Primary Navigation','analytical'),
));
/***** Make theme available for translation ****/
// Translations can be filed in the /lang/ directory
function skt_lang_setup(){
load_theme_textdomain('analytical', get_template_directory_uri() . '/languages');
}
add_action('after_setup_theme', 'skt_lang_setup');
/* * Loads the Options Panel * * If you're loading from a child theme use stylesheet_directory * instead of template_directory */
if ( !function_exists( 'optionsframework_init' ) ){
//Theme Shortname
$shortname = 'analytical-lite';
$themename='Analytical Lite Theme';
define( 'OPTIONS_FRAMEWORK_DIRECTORY',get_template_directory_uri() . '/SketchBoard/includes/' );
require_once get_template_directory() . '/SketchBoard/includes/options-framework.php';
require_once get_template_directory() . '/SketchBoard/functions/admin-init.php';
}
– I saved it as functions.php by using a note pad.
– I deleted fuctions.php from the theme directory and upload the amended fuctions.php by FTP.
– I browsed https://www.example.com/wordpress/wp-admin and https://www.example.com/wordpress/wp-login but the page cannot be found.
What am I doing wrong?