• Hi there

    Still very new to WordPress and I would like to add to my theme the option for the user to add the logo. I think this is done via the customizing menu.

    Could someone help with how this would be added as the option is not in there. All I have is

    Site Title
    Widgets
    Static Front Page

    I think I need code for the header plus to add something in the function.php file but not 100% sure.

    I would also like to be able to add the title to the header.php code but cant seam to get it working.

    Header.php code

    <?php
    /**
     * The Header template for my theme
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     * @package WordPress
     * @subpackage music_production_theme
     * @since Music Production Theme 1.0
     */
    ?>
    
    <!DOCTYPE html>
    <!--[if IE 7]>
    <html class="ie ie7" <?php language_attributes(); ?>>
    <![endif]-->
    
    <!--[if IE 8]>
    <html class="ie ie8" <?php language_attributes(); ?>>
    <![endif]-->
    
    <!--[if !(IE 7) & !(IE 8)]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->
    
    <head profile="https://gmpg.org/xfn/11">
    <meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>;
    charset=<?php bloginfo('charset'); ?>" />
    <title><?php bloginfo( 'name' ); ?> <?php if ( is_single() ) { ?> ? blog Archive <?php } ?>
    <?php wp_title(); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1"
    <link rel="stylesheet" href="<?php bloginfo( 'template_url' ); ?>" type="text/css" media="screen" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    
    <?php if ( is_singular() ) wp_enqueue_scripts( 'comment_reply' ); ?>
    <?php wp_head(); ?>
    </head>
    <body> <div class="Header-container"><?php body_class() ?>></div>
    <a href="<?php echo get_option ('home');?>"><img src="<?php bloginfo('template_url');?>/images/logo.png" title="bloginfo('title');"></a>
    <div id="page">
    <header id="header">
    <h1><a href="<?php bloginfo('url'); ?>"></a></h1>
    </header>
    <section>

    function.php code

    <?php
    if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'sidebar',
    ));
    ?>

    Thanks for the help and guidance and understanding.

Viewing 1 replies (of 1 total)
  • Hello guys,
    I was making some changes on my function.php file but suddenly last line was removed and not i am getting an error “Parse error: syntax error, unexpected ‘?> ‘ in /home/civude/public_html/wp-content/themes/smallbiz/functions.php on line 1444”

    Please tell me how do i close my function.php file?
    here is last few lines from my php file.

    // update frontpage — don’t include this with the others to avoid confusion with non-smallbiz
    // page_on_front.
    if(isset($_POST[‘smallbiz_page_on_front’])){
    update_option(‘smallbiz_page_on_front’, stripcslashes($_POST[‘smallbiz_page_on_front’]));
    }

    // Update photo

    if($_POST[‘banner’] == “” && $_FILES[‘new_banner’][‘tmp_name’] != “”){
    // No longer remove old files.
    //unlink(dirname(__FILE__).’/images/banners/’.get_option(‘smallbiz_banner’));
    $newFileName = str_replace(” “, “_”, $_FILES[‘new_banner’][‘name’]);
    @move_uploaded_file($_FILES[‘new_banner’][‘tmp_name’], dirname(__FILE__). ‘/images/banners/’. $newFileName);

    update_option(‘smallbiz_banner’, $newFileName);

    } else if($_POST[‘banner’] != get_option(‘smallbiz_banner’)){
    update_option(‘smallbiz_banner’, stripcslashes($_POST[‘banner’]));
    }

    if($_FILES[‘page_image’][‘tmp_name’] != “”){

    unlink(dirname(__FILE__).’/images/’.get_option(‘smallbiz_page

Viewing 1 replies (of 1 total)
  • The topic ‘Help code to allow user to add there logo’ is closed to new replies.