• I tried to reply to the original post, but it didn’t get bumped, so no one could see it. I was hoping Dgold would see this since he was helping me a lot. anyhow, here is goes:

    I was able to modify my header. I changed the name of the links also at the top of the header. Now, I’m trying to point the links to the right area. Here is my blog:

    https://www.swankpets.com/blog/

    So for example, I just wanted to have ‘SHOP NOW AT SWANKPETS’ go to my homepage, https://www.swankpets.com

    I tried this code:
    # shop now at swankpets

    But now it points to: https://www.swankpets.com/blog/www.swankpets.com

    So you can see that everything I place a link to will have this in front of it: https://www.swankpets.com/blog/whatever…

    Could you help in seeing where I can change the code so my links will appear correctly, without the prefix https://www.swankpets.com/blog whenever I need to.

    HERE IS THE ORIGINAL ENTIRE HEADER.PHP CODE:

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”https://www.w3.org/1999/xhtml”&gt;

    <head profile=”https://gmpg.org/xfn/11″&gt;
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />

    <title><?php if (is_single() || is_page() || is_archive()) { wp_title(”,true); } else { bloginfo(‘name’); echo(‘ — ‘); bloginfo(‘description’); } ?></title>

    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” /> <!– leave this for stats –>

    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
    <link rel=”stylesheet” href=”<?php bloginfo(‘template_url’); ?>/custom.css” type=”text/css” media=”screen” />
    <!–[if lte IE 7]>
    <link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘template_url’); ?>/ie7.css” media=”screen” />
    <![endif]–>
    <!–[if lte IE 6]>
    <link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘template_url’); ?>/ie6.css” media=”screen” />
    <![endif]–>
    <link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(‘name’); ?> RSS Feed” href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />

    <?php wp_head(); ?>
    </head>
    <body class=”custom”>

    <div id=”container”>

    <div id=”masthead”>
    <h1>”><?php bloginfo(‘name’); ?></h1>
    <h3><?php bloginfo(‘description’); ?></h3>
    </div>

    <ul id=”nav”>
    # href=”<?php bloginfo(‘url’); ?>”>front page
    # href=”<?php bloginfo(‘url’); ?>/archives/”>archives
    # shop now at swankpets

    <li class=”rss”>”>RSS

    <div id=”header_img”>
    <?php if (is_home()) { ?>
    <img src=”<?php bloginfo(‘template_url’); ?>/images/header_1.jpg” width=”970″ height=”140″ alt=”<?php bloginfo(‘name’); ?> header image 1″ title=”<?php bloginfo(‘name’); ?> header image 1″ />
    <?php } elseif (is_single()) { ?>
    <img src=”<?php bloginfo(‘template_url’); ?>/images/header_2.jpg” width=”970″ height=”140″ alt=”<?php bloginfo(‘name’); ?> header image 2″ title=”<?php bloginfo(‘name’); ?> header image 2″ />
    <?php } elseif (is_page()) { ?>
    <img src=”<?php bloginfo(‘template_url’); ?>/images/header_3.jpg” width=”970″ height=”140″ alt=”<?php bloginfo(‘name’); ?> header image 3″ title=”<?php bloginfo(‘name’); ?> header image 3″ />
    <?php } elseif (is_archive()) { ?>
    <img src=”<?php bloginfo(‘template_url’); ?>/images/header_4.jpg” width=”970″ height=”140″ alt=”<?php bloginfo(‘name’); ?> header image 4″ title=”<?php bloginfo(‘name’); ?> header image 4″ />
    <?php } else { ?>
    <img src=”<?php bloginfo(‘template_url’); ?>/images/header_5.jpg” width=”970″ height=”140″ alt=”<?php bloginfo(‘name’); ?> header image 5″ title=”<?php bloginfo(‘name’); ?> header image 5″ />
    <?php } ?>
    </div>

Viewing 6 replies - 1 through 6 (of 6 total)
  • Creating a link (anchor) has NOTHING to do with WordPress. If you want a website – go and learn the basics:
    https://www.w3schools.com/html/default.asp
    (hint: click on Links)

    Thread Starter mhsiao45

    (@mhsiao45)

    this is a wordpress theme that i downloaded. it’s the header.php code that was in the file. i’m not trying to make a website. i notice most of your posts are smart ass remarks. why don’t you save yourself some time, and not say anything, and let more helpful and knowledgeable people actually answer the questions, rather than post snide remarks. if you don’t know the answer, which you obviously don’t, how about you don’t reply. what a concept.
    (hint: take some personality classes)

    I may be wrong but I think the problem may be as simple as leaving out the https:// in your a href for the link you are having problems with.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    mhsiao45: Actually, if you’d READ what was posted, you’d realize that moshu did, in fact, give you the answer you were looking for.

    No, really. Look here, where moshu told you to go: https://www.w3schools.com/html/html_links.asp

    So instead of insulting moshu because he expected you to actually try and learn something instead of simply giving you the answer, why don’t you actually go and learn something instead? Then you’ll actually know the answers.

    Because knowing is half the battle! ??

    I agree that learning abouthow to use html is the answer in the long run but often someone out there has been down the same road and can see the problem.

    try this
    instead of https://www.swankpets.com for the link simply put ..

    that’s right just the two dots. When i used this in the browser it sent the browser back to the root. Just like ../will take you back a folder.

    it is html and not WordPress

    try it.
    Simcoe

    Thread Starter mhsiao45

    (@mhsiao45)

    Thanks, I’ll give these tips a shot. Sorry if I misunderstood before, i was just getting frustrated

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Please help me with this Header Code’ is closed to new replies.