Forums › Forums › Menus › Inserting Code (Revised as per "read before posting " Administrator message
- This topic has 2 replies, 2 voices, and was last updated 14 years, 11 months ago by imported_Ryan.
-
AuthorPosts
-
December 12, 2009 at 2:26 am #1130gmacMember
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">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
xml:lang="en" >
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>" />
<title><?php bloginfo(‘name’); ?> <?php if (is_home()): ?> » 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.
December 13, 2009 at 1:05 am #7410gmacMemberWould love some help if anyone can spare 5 minutes. Thanks!
December 14, 2009 at 2:39 am #7411imported_RyanMemberTry 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).
-
AuthorPosts
- You must be logged in to reply to this topic.