March 5, 201214 yr Hello all, I thought I had the header sorted but now my logo (header img) doesn't show up any of the pages except index.php. I was thinking perhaps I'm supposed to put this image in the header section under appearances in the dashboard but I had it all nice and positioned and don't see any need. Here's my header code: <div id="header"> <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="wp-content/themes/bulletinboard/images/logo.jpg" alt="logo"></a> <h1><?php bloginfo( 'name' ); ?></h1><!-- for screenreaders --> <p><?php bloginfo( 'description' ); ?></p><!-- for screenreaders --> <div id="header_postit"> </div><!-- #header_postit --> <div id="access" role="navigation"> <div class="skip-link screen-reader-text"> <a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"> <?php _e( 'Skip to content', 'twentyten' ); ?></a> </div><!-- .skip-link --> <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?> </div><!-- #access --> </div> <!--end#header--> I'm sure its something stupid like I hit the backspace somewhere but I can't find it and the page still validates. Also is it normal that when I click on the little question mark the logo reappears? I've never had this happen before. Thanks in advance.
March 5, 201214 yr Ok, but its a right mess at the moment:My link Thanks. Can you try this as the link <img alt="logo" src="/wp-content/themes/bulletinboard/images/logo.jpg">
March 5, 201214 yr Author Thanks Pat. Yep, that was it. I still don't know what I did wrong. It looks like you switched alt and source?
March 5, 201214 yr Thanks Pat. Yep, that was it. I still don't know what I did wrong. It looks like you switched alt and source? The order isn't important, but he added / in front of the image url. That makes it a root-relative link, but it probably only works with your online page from the server root as the root on your local computer is C:\......... and it usually doesn't work locally. I haven't checked, but your index.php page is probably in a different folder from the other pages so the path is different unless you go back to the root.
March 5, 201214 yr Author Ah, I see it now. Cheers for the explanation. I haven't checked, but your index.php page is probably in a different folder from the other pages so the path is different unless you go back to the root. Actually, no, they are all in the same folder although I don't quite understand why there is an index.php at every level in wordpress- so maybe that has something to do with it. But you're right that it did work when I was working locally. Anyway, its good to know and I'm glad it wasn't just a stupid typo.
March 5, 201214 yr Ah, I see it now. Cheers for the explanation. Actually, no, they are all in the same folder although I don't quite understand why there is an index.php at every level in wordpress- so maybe that has something to do with it. But you're right that it did work when I was working locally. Anyway, its good to know and I'm glad it wasn't just a stupid typo. People usually include index pages in all folders to prevent Directory Indexes showing, for those who never bother to disable them. That makes it a root-relative link, but it probably only works with your online page from the server root as the root on your local computer is C:\......... and it usually doesn't work locally. You can use a <base> tag to help define a an absolute root for all relative url's, Personally i think it's one of those often overlooked tags which is actually pretty useful. Edited March 5, 201214 yr by bocaj
March 6, 201214 yr Author People usually include index pages in all folders to prevent Directory Indexes showing, for those who never bother to disable them. That would be me You can use a <base> tag to help define a an absolute root for all relative url's, Personally i think it's one of those often overlooked tags which is actually pretty useful. Good to know. I think I'll leave it as is for this go around but I'll remember that for when I get a bit more comfortable with all of this. Edited March 6, 201214 yr by mantis
Create an account or sign in to comment