• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

trying to add my logo to a wordpress theme

GeorgeB

Chairman/CEO TMCG
NLC
I am trying my best to add my company logo, to a new installation of wordpress.

The blog is at blog.viprecycling.com

I have the logo uploaded, and I have added this CSS code to style.css in the themes folder for the theme I have installed.

I have followed the instructions to the T, but all I am getting is the name of the site to show up?


Find the text
Start EXAMPLE CODE for an image logo (line 224)
Delete /* before
#logo, (line 225)
Delete */ (line 230) after
.description (line 229)
Find logo.png (line 228) and replace it with the name of your logo.
Change the height and width to fit your logo (line 226)
#logo, #logo a { display: block; height: 19px; width: 87px; }
Find the text
Start EXAMPLE CODE for a text logo (line 234)
Add /* before
#branding (line 235)
Add */ (line 239) after
#logo, .description { color: #868F98; float: left; margin: 17px 0 0 10px; } (line 238)
Save your changes and upload the file style.css to your themes folder.


The instructions are:
  • Start EXAMPLE CODE for an image logo (line 224)
  • Delete /* before
    #logo, (line 225)
  • Delete */ (line 230) after
    .description (line 229)
  • Find logo.png (line 228) and replace it with the name of your logo.
  • Change the height and width to fit your logo (line 226)
    #logo, #logo a { display: block; height: 19px; width: 87px; }
  • Find the text
    Start EXAMPLE CODE for a text logo (line 234)
  • Add /* before
    #branding (line 235)
  • Add */ (line 239) after
    #logo, .description { color: #868F98; float: left; margin: 17px 0 0 10px; } (line 238)
  • Save your changes and upload the file style.css to your themes folder.
 
Should just be a matter of replacing logo.png with your logo. Rename your logo "logo.png", upload it, overwrite the existing, and refresh your browser cache. Should be good to go.
 
Should just be a matter of replacing logo.png with your logo. Rename your logo "logo.png", upload it, overwrite the existing, and refresh your browser cache. Should be good to go.

I knew I forgot to add something to the original post last night.

I did that.

The proper logo is uploaded, and renamed, and the coding for the text logo is commented out.

The coding and everything is how a lot of people on different forums said to do, with this particular theme, but not understanding why it is only showing the name, but no logo.
 
I got it to work....http://blog.viprecycling.com

Or at least it is displaying the logo for me lol.

I figured since wordpress has plugins for everything, they might have one for a logo, and I was right.

I used a plugin called "Theme Logo"

I imputed the url for the location of the logo.

Then, I went into header, using dreamweaver, did a search for "logo" and edited that entire line with this html code:

<a href="http://www.domain.com" rel="nofollow"><img src="http://www.domain.com/locationofimage" alt="HTML tutorial" width="40" height="40">

From there I played with the width and height numbers till the logo looked good on the site.

NOTE: The html code the plugin gives you, did NOT work for me.
 
Yep...looks good to me too! You shouldn't need a plugin to do that, but such is the magic of Wordpress. :)
 
for future reference, there are a couple ways to replace the logo. you can upload it directly to the media upload area and call the file in the css where it calls the default one, or replace the default one in the image directory and mod the css accordingly.
 
I was trying to figure out why the wordpress admin options that display at the top, once you login and are viewing the blog, was not displaying.

So, I took down the template and re installed it. Found out the issue, but since the footer looked beyond ugly, I re deleted the code for it.

Is there a way to edit the footer and NOT have it mess up the header, so that the admincp options appear at the top when viewing the blog being logged in?
 
Last edited:
I need a little help with the logo.

Since I deleted and re installed the template, I had to re add the html code. I have used the same code as before, but now the logo is wanting to be right on or in the middle, or below the green menu bar. How can I make it go higher?

http://blog.viprecycling.com

PS. I Got it. I keep forgetting about using Google (when you get frustrated, it is way to easy to forget simple things in life lol)

Anyways, for anyone who is having the issue with the logo. Go into style.css and search for "logo" and edit the "top" value.
 
Last edited:
Thanks.

Now just need to figure out how to edit the footer to get rid of the ugly stuff, and not have it mess up the header.
 
I am also struggling some these kinds of problems , I have download free wordpress them for my site and now i am struggling to make changes to the footer and header , how can I make changes can anyone tell me .
 
I am also struggling some these kinds of problems , I have download free wordpress them for my site and now i am struggling to make changes to the footer and header , how can I make changes can anyone tell me .

You edit the footer file either in dreamweaver, like I do, or you use a free program like notepad++
 
Okay,

I am racking my brain to figure out how to edit the footer here http://blog.viprecycling.com so that the ugly footer at the bottom (menu bar, etc) is gone, and just my copyright information is left?

If I did the tiny code in the footer file, it messes up the header.php file, so that the wordpress admin options wont appear when viewing the site logged in.
 
It should be as simple as removing a div, could you post your footer code here?

Thanks!
 
Is that for your wordpress theme or for the main directory footer? I think that's your main directory's footer.
 
This is the code for global template:

Also, I tried the same theme for the link you provided, and still showing the black bar.


<?php
/**
* General template tags that can go anywhere in a template.
*
* @package WordPress
* @subpackage Template
*/

/**
* Load header template.
*
* Includes the header template for a theme or if a name is specified then a
* specialised header will be included.
*
* For the parameter, if the file is called "header-special.php" then specify
* "special".
*
* @uses locate_template()
* @since 1.5.0
* @uses do_action() Calls 'get_header' action.
*
* @param string $name The name of the specialised header.
*/
function get_header( $name = null ) {
do_action( 'get_header', $name );

$templates = array();
if ( isset($name) )
$templates[] = "header-{$name}.php";

$templates[] = 'header.php';

// Backward compat code will be removed in a future release
if ('' == locate_template($templates, true))
load_template( ABSPATH . WPINC . '/theme-compat/header.php');
}

/**
* Load footer template.
*
* Includes the footer template for a theme or if a name is specified then a
* specialised footer will be included.
*
* For the parameter, if the file is called "footer-special.php" then specify
* "special".
*
* @uses locate_template()
* @since 1.5.0
* @uses do_action() Calls 'get_footer' action.
*
* @param string $name The name of the specialised footer.
*/
function get_footer( $name = null ) {
do_action( 'get_footer', $name );

$templates = array();
if ( isset($name) )
$templates[] = "footer-{$name}.php";

$templates[] = 'footer.php';

// Backward compat code will be removed in a future release
if ('' == locate_template($templates, true))
load_template( ABSPATH . WPINC . '/theme-compat/footer.php');
}

/**
* Load sidebar template.
*
* Includes the sidebar template for a theme or if a name is specified then a
* specialised sidebar will be included.
*
* For the parameter, if the file is called "sidebar-special.php" then specify
* "special".
*
* @uses locate_template()
* @since 1.5.0
* @uses do_action() Calls 'get_sidebar' action.
*
* @param string $name The name of the specialised sidebar.
*/
function get_sidebar( $name = null ) {
do_action( 'get_sidebar', $name );

$templates = array();
if ( isset($name) )
$templates[] = "sidebar-{$name}.php";

$templates[] = 'sidebar.php';

// Backward compat code will be removed in a future release
if ('' == locate_template($templates, true))
load_template( ABSPATH . WPINC . '/theme-compat/sidebar.php');
}

/**
* Load a template part into a template
*
* Makes it easy for a theme to reuse sections of code in a easy to overload way
* for child themes.
*
* Includes the named template part for a theme or if a name is specified then a
* specialised part will be included. If the theme contains no {slug}.php file
* then no template will be included.
*
* The template is included using require, not require_once, so you may include the
* same template part multiple times.
*
* For the $name parameter, if the file is called "{slug}-special.php" then specify
* "special".
*
* @uses locate_template()
* @since 3.0.0
* @uses do_action() Calls 'get_template_part_{$slug}' action.
*
* @param string $slug The slug name for the generic template.
* @param string $name The name of the specialised template.
*/
function get_template_part( $slug, $name = null ) {
do_action( "get_template_part_{$slug}", $slug, $name );

$templates = array();
if ( isset($name) )
$templates[] = "{$slug}-{$name}.php";

$templates[] = "{$slug}.php";

locate_template($templates, true, false);
}
 
/**
* Display search form.
*
* Will first attempt to locate the searchform.php file in either the child or
* the parent, then load it. If it doesn't exist, then the default search form
* will be displayed. The default search form is HTML, which will be displayed.
* There is a filter applied to the search form HTML in order to edit or replace
* it. The filter is 'get_search_form'.
*
* This function is primarily used by themes which want to hardcode the search
* form into the sidebar and also by the search widget in WordPress.
*
* There is also an action that is called whenever the function is run called,
* 'get_search_form'. This can be useful for outputting JavaScript that the
* search relies on or various formatting that applies to the beginning of the
* search. To give a few examples of what it can be used for.
*
* @since 2.7.0
* @param boolean $echo Default to echo and not return the form.
*/
function get_search_form($echo = true) {
do_action( 'get_search_form' );

$search_form_template = locate_template('searchform.php');
if ( '' != $search_form_template ) {
require($search_form_template);
return;
}

$form = '<form role="search" method="get" id="searchform" action="' . esc_url( home_url( '/' ) ) . '" >
<div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
<input type="text" value="' . get_search_query() . '" name="s" id="s" />
<input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
</div>
</form>';

if ( $echo )
echo apply_filters('get_search_form', $form);
else
return apply_filters('get_search_form', $form);
}

/**
* Display the Log In/Out link.
*
* Displays a link, which allows users to navigate to the Log In page to log in
* or log out depending on whether they are currently logged in.
*
* @since 1.5.0
* @uses apply_filters() Calls 'loginout' hook on HTML link content.
*
* @param string $redirect Optional path to redirect to on login/logout.
* @param boolean $echo Default to echo and not return the link.
*/
function wp_loginout($redirect = '', $echo = true) {
if ( ! is_user_logged_in() )
$link = '<a href="' . esc_url( wp_login_url($redirect) ) . '">' . __('Log in') . '</a>';
else
$link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';

if ( $echo )
echo apply_filters('loginout', $link);
else
return apply_filters('loginout', $link);
}

/**
* Returns the Log Out URL.
*
* Returns the URL that allows the user to log out of the site
*
* @since 2.7.0
* @uses wp_nonce_url() To protect against CSRF
* @uses site_url() To generate the log in URL
* @uses apply_filters() calls 'logout_url' hook on final logout url
*
* @param string $redirect Path to redirect to on logout.
*/
function wp_logout_url($redirect = '') {
$args = array( 'action' => 'logout' );
if ( !empty($redirect) ) {
$args['redirect_to'] = urlencode( $redirect );
}

$logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
$logout_url = wp_nonce_url( $logout_url, 'log-out' );

return apply_filters('logout_url', $logout_url, $redirect);
}

/**
* Returns the Log In URL.
*
* Returns the URL that allows the user to log in to the site
*
* @since 2.7.0
* @uses site_url() To generate the log in URL
* @uses apply_filters() calls 'login_url' hook on final login url
*
* @param string $redirect Path to redirect to on login.
* @param bool $force_reauth Whether to force reauthorization, even if a cookie is present. Default is false.
* @return string A log in url
*/
function wp_login_url($redirect = '', $force_reauth = false) {
$login_url = site_url('wp-login.php', 'login');

if ( !empty($redirect) )
$login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url);

if ( $force_reauth )
$login_url = add_query_arg('reauth', '1', $login_url);

return apply_filters('login_url', $login_url, $redirect);
}

/**
* Provides a simple login form for use anywhere within WordPress. By default, it echoes
* the HTML immediately. Pass array('echo'=>false) to return the string instead.
*
* @since 3.0.0
* @param array $args Configuration options to modify the form output
* @return Void, or string containing the form
*/
function wp_login_form( $args = array() ) {
$defaults = array( 'echo' => true,
'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], // Default redirect is back to the current page
'form_id' => 'loginform',
'label_username' => __( 'Username' ),
'label_password' => __( 'Password' ),
'label_remember' => __( 'Remember Me' ),
'label_log_in' => __( 'Log In' ),
'id_username' => 'user_login',
'id_password' => 'user_pass',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'remember' => true,
'value_username' => '',
'value_remember' => false, // Set this to true to default the "Remember me" checkbox to checked
);
$args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );

$form = '
<form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( site_url( 'wp-login.php', 'login_post' ) ) . '" method="post">
' . apply_filters( 'login_form_top', '', $args ) . '
<p class="login-username">
<label for="' . esc_attr( $args['id_username'] ) . '">' . esc_html( $args['label_username'] ) . '</label>
<input type="text" name="log" id="' . esc_attr( $args['id_username'] ) . '" class="input" value="' . esc_attr( $args['value_username'] ) . '" size="20" tabindex="10" />
</p>
<p class="login-password">
<label for="' . esc_attr( $args['id_password'] ) . '">' . esc_html( $args['label_password'] ) . '</label>
<input type="password" name="pwd" id="' . esc_attr( $args['id_password'] ) . '" class="input" value="" size="20" tabindex="20" />
</p>
' . apply_filters( 'login_form_middle', '', $args ) . '
' . ( $args['remember'] ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr( $args['id_remember'] ) . '" value="forever" tabindex="90"' . ( $args['value_remember'] ? ' checked="checked"' : '' ) . ' /> ' . esc_html( $args['label_remember'] ) . '</label></p>' : '' ) . '
<p class="login-submit">
<input type="submit" name="wp-submit" id="' . esc_attr( $args['id_submit'] ) . '" class="button-primary" value="' . esc_attr( $args['label_log_in'] ) . '" tabindex="100" />
<input type="hidden" name="redirect_to" value="' . esc_url( $args['redirect'] ) . '" />
</p>
' . apply_filters( 'login_form_bottom', '', $args ) . '
</form>';

if ( $args['echo'] )
echo $form;
else
return $form;
}

/**
* Returns the Lost Password URL.
*
* Returns the URL that allows the user to retrieve the lost password
*
* @since 2.8.0
* @uses site_url() To generate the lost password URL
* @uses apply_filters() calls 'lostpassword_url' hook on the lostpassword url
*
* @param string $redirect Path to redirect to on login.
*/
function wp_lostpassword_url( $redirect = '' ) {
$args = array( 'action' => 'lostpassword' );
if ( !empty($redirect) ) {
$args['redirect_to'] = $redirect;
}

$lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') );
return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );
}

/**
* Display the Registration or Admin link.
*
* Display a link which allows the user to navigate to the registration page if
* not logged in and registration is enabled or to the dashboard if logged in.
*
* @since 1.5.0
* @uses apply_filters() Calls 'register' hook on register / admin link content.
*
* @param string $before Text to output before the link (defaults to <li>).
* @param string $after Text to output after the link (defaults to </li>).
* @param boolean $echo Default to echo and not return the link.
*/
function wp_register( $before = '<li>', $after = '</li>', $echo = true ) {

if ( ! is_user_logged_in() ) {
if ( get_option('users_can_register') )
$link = $before . '<a href="' . site_url('wp-login.php?action=register', 'login') . '">' . __('Register') . '</a>' . $after;
else
$link = '';
} else {
$link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
}

if ( $echo )
echo apply_filters('register', $link);
else
return apply_filters('register', $link);
}

/**
* Theme container function for the 'wp_meta' action.
*
* The 'wp_meta' action can have several purposes, depending on how you use it,
* but one purpose might have been to allow for theme switching.
*
* @since 1.5.0
* @link http://trac.wordpress.org/ticket/1458 Explanation of 'wp_meta' action.
* @uses do_action() Calls 'wp_meta' hook.
*/
function wp_meta() {
do_action('wp_meta');
}

/**
* Display information about the blog.
*
* @see get_bloginfo() For possible values for the parameter.
* @since 0.71
*
* @param string $show What to display.
*/
function bloginfo( $show='' ) {
echo get_bloginfo( $show, 'display' );
}

/**
* Retrieve information about the blog.
*
* Some show parameter values are deprecated and will be removed in future
* versions. These options will trigger the _deprecated_argument() function.
* The deprecated blog info options are listed in the function contents.
*
* The possible values for the 'show' parameter are listed below.
* <ol>
* <li><strong>url</strong> - Blog URI to homepage.</li>
* <li><strong>wpurl</strong> - Blog URI path to WordPress.</li>
* <li><strong>description</strong> - Secondary title</li>
* </ol>
*
* The feed URL options can be retrieved from 'rdf_url' (RSS 0.91),
* 'rss_url' (RSS 1.0), 'rss2_url' (RSS 2.0), or 'atom_url' (Atom feed). The
* comment feeds can be retrieved from the 'comments_atom_url' (Atom comment
* feed) or 'comments_rss2_url' (RSS 2.0 comment feed).
*
* @since 0.71
*
* @param string $show Blog info to retrieve.
* @param string $filter How to filter what is retrieved.
* @return string Mostly string values, might be empty.
*/
function get_bloginfo( $show = '', $filter = 'raw' ) {

switch( $show ) {
case 'home' : // DEPRECATED
case 'siteurl' : // DEPRECATED
_deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The <code>%s</code> option is deprecated for the family of <code>bloginfo()</code> functions.' ), $show ) . ' ' . sprintf( __( 'Use the <code>%s</code> option instead.' ), 'url' ) );
case 'url' :
$output = home_url();
break;
case 'wpurl' :
$output = site_url();
break;
case 'description':
$output = get_option('blogdescription');
break;
case 'rdf_url':
$output = get_feed_link('rdf');
break;
case 'rss_url':
$output = get_feed_link('rss');
break;
case 'rss2_url':
$output = get_feed_link('rss2');
break;
case 'atom_url':
$output = get_feed_link('atom');
break;
case 'comments_atom_url':
$output = get_feed_link('comments_atom');
break;
case 'comments_rss2_url':
$output = get_feed_link('comments_rss2');
break;
case 'pingback_url':
$output = get_option('siteurl') .'/xmlrpc.php';
break;
case 'stylesheet_url':
$output = get_stylesheet_uri();
break;
case 'stylesheet_directory':
$output = get_stylesheet_directory_uri();
break;
case 'template_directory':
case 'template_url':
$output = get_template_directory_uri();
break;
case 'admin_email':
$output = get_option('admin_email');
break;
case 'charset':
$output = get_option('blog_charset');
if ('' == $output) $output = 'UTF-8';
break;
case 'html_type' :
$output = get_option('html_type');
break;
case 'version':
global $wp_version;
$output = $wp_version;
break;
case 'language':
$output = get_locale();
$output = str_replace('_', '-', $output);
break;
case 'text_direction':
//_deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The <code>%s</code> option is deprecated for the family of <code>bloginfo()</code> functions.' ), $show ) . ' ' . sprintf( __( 'Use the <code>%s</code> function instead.' ), 'is_rtl()' ) );
if ( function_exists( 'is_rtl' ) ) {
$output = is_rtl() ? 'rtl' : 'ltr';
} else {
$output = 'ltr';
}
break;
case 'name':
default:
$output = get_option('blogname');
break;
}

$url = true;
if (strpos($show, 'url') === false &&
strpos($show, 'directory') === false &&
strpos($show, 'home') === false)
$url = false;

if ( 'display' == $filter ) {
if ( $url )
$output = apply_filters('bloginfo_url', $output, $show);
else
$output = apply_filters('bloginfo', $output, $show);
}

return $output;
}

/**
* Retrieve the current blog id
*
* @since 3.1.0
*
* @return int Blog id
*/
function get_current_blog_id() {
global $blog_id;
return absint($blog_id);
}

/**
* Display or retrieve page title for all areas of blog.
*
* By default, the page title will display the separator before the page title,
* so that the blog title will be before the page title. This is not good for
* title display, since the blog title shows up on most tabs and not what is
* important, which is the page that the user is looking at.
*
* There are also SEO benefits to having the blog title after or to the 'right'
* or the page title. However, it is mostly common sense to have the blog title
* to the right with most browsers supporting tabs. You can achieve this by
* using the seplocation parameter and setting the value to 'right'. This change
* was introduced around 2.5.0, in case backwards compatibility of themes is
* important.
*
* @since 1.0.0
*
* @param string $sep Optional, default is '&raquo;'. How to separate the various items within the page title.
* @param bool $display Optional, default is true. Whether to display or retrieve title.
* @param string $seplocation Optional. Direction to display title, 'right'.
* @return string|null String on retrieve, null when displaying.
*/
function wp_title($sep = '&raquo;', $display = true, $seplocation = '') {
global $wpdb, $wp_locale;

$m = get_query_var('m');
$year = get_query_var('year');
$monthnum = get_query_var('monthnum');
$day = get_query_var('day');
$search = get_query_var('s');
$title = '';

$t_sep = '%WP_TITILE_SEP%'; // Temporary separator, for accurate flipping, if necessary

// If there is a post
if ( is_single() || ( is_home() && !is_front_page() ) || ( is_page() && !is_front_page() ) ) {
$title = single_post_title( '', false );
}

// If there's a category or tag
if ( is_category() || is_tag() ) {
$title = single_term_title( '', false );
}

// If there's a taxonomy
if ( is_tax() ) {
$term = get_queried_object();
$tax = get_taxonomy( $term->taxonomy );
$title = single_term_title( $tax->labels->name . $t_sep, false );
}

// If there's an author
if ( is_author() ) {
$author = get_queried_object();
$title = $author->display_name;
 
Back
Top