WordPress.org

Forums

Header Image Problem (17 posts)

  1. Deconstructionist
    Member
    Posted 8 years ago #

    Alright. I found a really cool theme (i.e., 2cDarkGrey 1.1.) that should look good with the custom image I want to use with my banner. I have been browsing over this forum trying to figure out my image, but the discussions seem to focus on changing the image (Kubrick, whatever) in the default theme.

    "<div id="header">
    <h1>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></h1>
    </div>"

    ^^ That's the code in the header of the theme, all of it. I'm not seeing anywhere where I can switch the image, and I know nothing about HTML, sorry. What I need to know are basically two things:

    1.) Where do I upload my custom banner?
    2.) What is the exact code I need to use? I would like to simply paste it in the header if possible.

    Some info: file name dissect.jpg
    Dimensions: 808 (width) x 208 (height)

    Any help would be greatly appreciated. Thanks

  2. Samuel B
    moderator
    Posted 8 years ago #

    To simplify your life - Rename the current banner (in your theme's image folder) to something else to save it. Name your banner the exact same thing as the original. Upload your image to your theme's image folder.
    That's it - no need to change or hack code...it's called automatically.

  3. Deconstructionist
    Member
    Posted 8 years ago #

    My site administrator is telling me there is no banner image in this theme. That's what I thought originally. Here is a link to the demo:

    http://www.sr-ultimate.com/

    How would I edit the header template to replace that grey box with my image?

  4. Sr-ultimate
    Member
    Posted 8 years ago #

    Your site admin is right, there is no specific header image, its a small 5x5 image repeating itself in the header area.

    Now to put your header image work,

    - Open your style.css file,
    - Look for


    #header {
    border: 5px solid #767b7c;
    background: #2e383b url('img/bg.gif');
    width: 750px;
    margin: 0;
    padding:0;
    }

    - Replace that with

    #header {
    border: 5px solid #767b7c;
    background: #2e383b no-repeat url('img/dissect.jpg');
    width: 750px;
    height: 208px;
    margin: 0;
    padding:0;
    }

    - Upload the "dissect.jpg" inside "img" folder which is inside the theme folder.

    - If you don't need the URL Link on the header image, then open header.php and delete , everything inside the h1> tag

    --------

    Do not that I have reduce the header width to 750px, otherwise it will go out of the layout width.

    Hope that helps,
    Sreejith.

  5. Deconstructionist
    Member
    Posted 8 years ago #

    Awesome. That solved my problem right away. If you don't mind, I have two more brief questions:

    1.) I'm adding a front page blog to a larger website. I would like to create a navbar underneath the header for my users won't have any problem finding the other pages.

    http://img174.imageshack.us/img174/3518/navbar8km.jpg

    ^^ Just something simple like this. How would I do that?

    2.) The post headlines:

    "Tags Search Engines : TagFetch, KeoTag, Gada.Be and more"

    ^^ Like this on http://www.sr-ultimate.com/

    I would like to bold them if possible. How would I do that? Thanks for the help.

  6. yosemite
    Member
    Posted 8 years ago #

    For a start, you could check this out: http://24ways.org/advent/auto-selecting-navigation

    There's a link in the beginning for the basic construct of a centered tab-menu...

  7. JPCSTL
    Member
    Posted 8 years ago #

    (jumping in here)
    Yosemite, thanks for the link! I've been looking for something like that. Seems like I can do that with my CSS knowledge rather than PHP which I'm picking up bits and pieces..slowly.

    Say, I've seen a couple of themes (and the article you linked) talk about the active or current way of doing things, using PHP. Is there a good/basic reference for that for comparison? I wouldn't mind seeing it so I can play with the themes that currently utilize it (and for one it's not working and I would like to fix it).

  8. yosemite
    Member
    Posted 8 years ago #

    Sure, but it would be like the blind leading the blind ;')

    I've seen a couple of themes (and the article you linked) talk about the active or current way of doing things, using PHP. Is there a good/basic reference for that for comparison?

    I'm not sure I understand... Can you be more specific (it's afternoon here, I'm a morning person ;')?

  9. JPCSTL
    Member
    Posted 8 years ago #

    It's afternoon here too. We're in real trouble *grin*

    So, I've got a theme that has a nav across the top that is somehow supposed to change the highlight of the tab based on the page you're on. For example, "Blog" tab is highlighted when you're on the home, "Writing Log" is highlighted when you're on the Writing Log page, etc. Exactly what the css example you linked is doing, but using PHP instead. Somehow it's querying the loop (?) or something, to determine the page, then if it IS the "active" or "current" page, it's identifying it as such, then the CSS kicks in to format it so it's highlighted (and all the others are dim).

    It's not exactly working in the theme, though I conceptually understand what it's trying to do. I'm looking for a reference to what it's trying to do in order to fix it. Right now it's disabled and they're all dim (I don't currently have the theme active).

  10. yosemite
    Member
    Posted 8 years ago #

    I found the following:

    <!-- Start the Loop. -->
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <!-- The following tests if the current post is in category 3. -->
    <!-- If it is, the div box is given the CSS class "post-cat-three". -->
    <!-- Otherwise, the div box will be given the CSS class "post". -->
    <?php if ( in_category('3') ) { ?>
    <div class="post-cat-three">
    <?php } else { ?>
    <div class="post">
    <?php } ?>

    at this page:
    http://codex.wordpress.org/The_Loop

    The if/else would just need to be checking your page (instead of category, as above) I think.

    I also think you're rapidly passing my level of expertise ;')

  11. JPCSTL
    Member
    Posted 8 years ago #

    Uh, not so radiply, really. And thanks, that'll definitely give me something to chew on as a starting point. And I just need to spend some time with the theme that's (trying) implementing the toggle via PHP. At the end of the day I like the CSS option because I know I can figure that out. This PHP is sometimes not as intuitive as I need.

    Thanks again.

  12. Sr-ultimate
    Member
    Posted 8 years ago #

    Deconstructionist,

    For putting the navigation links, open your index.php file .

    Add this ,
    <div id="topnav"> <?php wp_list_pages('sort_column=menu_order&title_li='); ?> </div>

    Below this ,

    <?php get_header(); ?>

    Now in you style.css,

    Add this at the bottom of the page,

    #topnav {
    margin: 0;
    margin-bottom: 10px;
    padding: 5px;
    text-align: center;
    margin: 5px 0 0 0;
    }
    #topnav li {
    list-style-type: none;

    display: inline;
    }
    #topnav a {
    padding: 2px 6px 2px 6px;
    border: solid 1px #333333;
    text-decoration: none;
    color: #333333;
    }

    #topnav a:hover {
    background-color: #333333;
    color: #ffffff;
    }

    ---------------

    For making the title of the post Blod.

    Open style.css, and find

    .post-info a {
    text-decoration: none;
    color: #5f3804;
    border: none;
    }

    replace it with ,

    .post-info a {
    text-decoration: none;
    font-weight: bold;
    color: #5f3804;
    border: none;
    }

    ----------

    Regards,
    Sreejith

  13. JPCSTL
    Member
    Posted 8 years ago #

    Sweet, thank you!

  14. Deconstructionist
    Member
    Posted 8 years ago #

    Awesome. The post titles are now bold. I'm having problems with the navbar, though. A few more questions if you don't mind.

    1.) Where exactly in the index.php in the 2cDarkGrey theme editor do I add the relevant text? I'm new at this and don't want to screw up!

    2.) The banner is working fine now, but the title of my blog is showing through it unless I remove the title. How do I prevent this, but keep the blog title? The URL doesn't seem to be working either when I click on the banner? How do I fix this?

    3.)I would like to add an authors list on my sidebar; something like this:

    http://img159.imageshack.us/img159/263/authors8nj.jpg

    How would I do that? I should be good to go after I get this done. Thanks again for the help. :)

  15. Deconstructionist
    Member
    Posted 8 years ago #

    Scratch #1. I figured it out (misread your post). The navbar is up and working fine. Thanks. Two questions.

    1.) How do I left align the navbar?
    2.) How do I change the tabs to link directly to, say, "/forum" instead of "/?page_id=18."
    3.) Finally, now that the navbar is up, how do I eliminate the redunant page links?

  16. moshu
    Member
    Posted 8 years ago #

    1. In the code given you above change this:
    text-align: center;
    to
    text-align: left;

    2. http://codex.wordpress.org/Template_Tags/wp_list_pages
    See the parameters section; e.g. you can use "exclude" or, if those are children Pages > "depth"...

  17. Deconstructionist
    Member
    Posted 8 years ago #

    Thanks. My navbar is running smoothly and it is left aligned like I wanted. I still need help with three things.

    1.) I got the banner uploaded successfully, but my forum title is showing through my custom banner now. How do I keep the forum title, but prevent this from happening?

    2.) The custom banner is uploaded and works fine, but it is no longer clickable. How do I fix this?

    "<div id="header">
    <h1>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></h1>
    </div>"

    ^^ My header.php.

    3.) I still don't understand how to change the links in my new navbar. The home tab takes me to "/?page_id=17" instead of my home page. Where do I edit the URLs of the tabs?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.