Changing Logo Code
Hey there —
I need to change the CSS code for my custom logo, but I can’t find it in the header section. I want basically to insert this code:
Replacing Code in Your Header
Next you’re going to need to replace some code in your header.php file. (Appearance > Editor > Header – header.php)
The easiest way to look for this code is to search for a unique part of it, the part that looks like the following:
The “img src=” bit tells you the “image source.” That’s not the only part you will need to replace, but that should lead you to the section you need to replace.
The complete section you need to replace is going to vary by theme. When I search for “img src=” in the default Twenty Eleven theme, for example, I find this:
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
I am going to want to replace that whole section with some new code. Here’s the MODEL of the new code (you will still need to change some of this):
<img src="https://path_to_images/header_<?php echo(rand(1,5)); ?>.jpg" width="image_width" height="image_height" alt="image_alt_text" />
…among other things.
The blog I need help with is: lanceschaubert.org
The theme’s code is not accessible on WordPress.com. It looks like the instructions you found are for a self-hosted version of WordPress. If you’re not sure what the difference is, here’s an article that explains it: https://en.support.wordpress.com/com-vs-org/
If you need to do any changes CSS changes you’ll need to have a Premium account to do so. Here’s some information on that.
I hope that helps!
The topic ‘Changing Logo Code’ is closed to new replies.