• Resolved darrylhowse

    (@darrylhowse)


    Hi, New to WordPress.

    Installed ok and loaded a new theme.

    Now want to add some things tabs or something at the top for different pages.

    If you have a look at my website https://www.darrylhowse.com you will see at the top a HOME tab.

    I would like to know how to add more of those and seperate pages for those such as an ABOUT page, CONTACT etc

    Oh yeah , please let me know the correct terminology too ??

    Awesome and have a great day to you all.

    Darryl

Viewing 3 replies - 1 through 3 (of 3 total)
  • This will probably be found in your “Header.php”

    Find where the “Home” link is, duplicate it directly under the “Home” link and then change “Home” to “About” or whatever you want. You’ll then need to add the link to the page that you want to link to.

    Thread Starter darrylhowse

    (@darrylhowse)

    Hi

    Thanks for that.

    Hmmm not exactly sure what part to copy and duplicate.

    Here is the code copied:

    _________________________________________________________________________

    <!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>
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
    <title><?php if (is_home () ) { bloginfo(?name?); }
    elseif ( is_category() ) { single_cat_title(); echo ‘ – ‘ ; bloginfo(?name?); }
    elseif (is_single() ) { single_post_title();}
    elseif (is_page() ) { single_post_title();}
    else { wp_title(??,true); } ?></title>
    <meta name=”robots” content=”index,follow” />
    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” />
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
    <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>
    <div id=”wrapper”>

    <div id=”header”>
    <div class=”topright”><!– Edit welcome message here –>Welcome to Darryl Howse’s Blog! Follow me on my epic journey of earning an income from Internet Marketing. “>Learn more about us »

    </div>
    <h1 class=”sitename”>“><?php bloginfo(‘name’); ?></h1>
    <h2 class=”sitedesc”><?php bloginfo(‘description’); ?></h2>
    </div> <!– Closes Header –>

    <div id=”nav”>

    <div class=”search”><?php include (TEMPLATEPATH . ‘/searchform.php’); ?></div> <!– Closes Search –>

    <?php function get_the_pa_ges() {
    global $wpdb;
    if ( ! $these_pages = wp_cache_get(‘these_pages’, ‘pages’) ) {
    $these_pages = $wpdb->get_results(‘select ID, post_title from ‘. $wpdb->posts .’ where post_status = “publish” and post_type = “page” order by ID’);

    }
    return $these_pages;
    }

    function list_all_pages(){

    $all_pages = get_the_pa_ges ();
    foreach ($all_pages as $thats_all){
    $the_page_id = $thats_all->ID;

    if (is_page($the_page_id)) {
    $addclass = ‘ class=”current_page”‘;
    } else {
    $addclass = ”;
    }
    $output .= ‘<li’ . $addclass . ‘>ID).'” title=”‘.$thats_all->post_title.'”><span>’.$thats_all->post_title.'</span>‘;
    }

    return $output;
    }
    ?>

      <?php

      if (is_home()) {
      $addclass = ‘ class=”current_page”‘;
      } else {
      $addclass = ”;
      }
      echo “<li” . $addclass . “><span>Home</span>“;
      echo list_all_pages();?>

    <div class=”cleared”></div>
    </div> <!– Closes Nav –>

    <div class=”topcurvewhite”></div>
    <div id=”main”>

    Thread Starter darrylhowse

    (@darrylhowse)

    Got it all sorted. Thanks for pointing me in the right directions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How To Add Things At The Top’ is closed to new replies.