Inserting Code (Revised as per "read before posting " Administrator message

Forums Forums Menus Inserting Code (Revised as per "read before posting " Administrator message

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1130
    gmac
    Member

    I have looked through the header code and I can not figure out where to insert the code to get this working. Here is my header file:

    http://www.factmedia.net/garytyson/wp-c … header.php

    http://www.factmedia.net/garytyson/wp-c … /style.css


    <?

    /*
    * header.php
    *


    * Header file for every page. Does standard stuff like including the JavaScript files
    * necessary for each site and a bunch of other stuff.
    */

    // Hack for always displaying a single post. Taken from the Viewfinder Grain theme
    // which you can find at: http://mac.defx.de/grain-theme/

    if (is_home()) {
      $myposts = get_posts(‘numberposts=1&orderby=ID&order=DESC’);
      foreach ($myposts as $post)
          break;
      // pretend we are on a single page so that next/prev post functions work
      $wp_query->is_single = true;
    }

    echo ‘<?xml version="1.0" encoding="UTF-8"?>’;

    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
    <html xmlns="http://www.w3.org/1999/xhtml&quot;
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
        xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd&quot;
        xml:lang="en" >
    <head profile="http://gmpg.org/xfn/11"&gt;
      <meta http-equiv="Content-Type" content="<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>" />
      <title><?php bloginfo(‘name’); ?> <?php if (is_home()): ?> &raquo; latest <?php else: ?><?php wp_title(); ?><?php endif;?></title>

      <meta name="generator" content="WordPress <?php bloginfo(‘version’); ?>" />
     
      <script type="text/javascript" src="<?php bloginfo(‘template_directory’);?>/js/mootools-1.2.1-core.js"></script>
      <script type="text/javascript" src="<?php bloginfo(‘template_directory’);?>/js/mootools-1.2-more.js"></script>
      <?if (is_home() || is_single()):?><script type="text/javascript" src="<?php bloginfo(‘template_directory’);?>/js/blog.js"></script>

      <script type="text/javascript">
        Site.templateDir = ‘<?php bloginfo(‘template_directory’);?>’;
        window.addEvent(‘load’, Site.init.bind(Site));
      </script><?php endif;?>
      <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(); ?>
     
      <?= $headinclude ?>
    </head>
    <body>

    <div id="topcontainer">
      <div id="header">
        <a href="<?php bloginfo(‘url’);?>">
          <img src="<?php bloginfo(‘template_directory’);?>/images/logo.jpg" alt="logo" style="border:0;" />
        [/url]
        <div id="navbar">
          <ul>
            <?if(get_opt_or_default(‘showrand’)):?><li><a href="<?php bloginfo(‘url’);?>/?do=random"><?_e(‘Random’,TD);?>[/url]</li><?endif;?>
            <?php wp_list_pages(‘title_li=&sort_column=menu_order’); ?>
                  </ul>
        </div>
      </div>



    website: http://garytyson.factphotography.com.hk/

    Any help will be greatly appreciated.

    Thanks,

    gmac

    * Header was cut and pasted as the link to header.php did not seem to work properly sometimes.

    #7410
    gmac
    Member

    Would love some help if anyone can spare 5 minutes. Thanks!

    #7411

    Try changing this code:
    [code:36yaic4k] <div id="navbar">
          <ul>
            <?if(get_opt_or_default(‘showrand’)):?><li><a href="<?php bloginfo(‘url’);?>/?do=random"><?_e(‘Random’,TD);?>[/url]</li><?endif;?>
            <?php wp_list_pages(‘title_li=&sort_column=menu_order’); ?>
                  </ul>
        </div>[/code:36yaic4k]

    To this:
    [code:36yaic4k]
    <?php if ( function_exists( ‘pixopoint_menu’ ) ) {pixopoint_menu();} ?>
    [/code:36yaic4k]

    Hopefully that will do the tricky (totally untested).

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.