governator1
Member
Posted 3 years ago #
I am trying to add a link in the navigation bar of my site that is not a page. I want it to be a link that allows people to download my resume. I am using Lunatic Fringe.
I have already tried something that did not work...
From this:
<div id="sub_menu">
<?php if(function_exists('wp_page_menu')) : ?>
<?php wp_page_menu ('show_home=1&depth=1&title_li='); ?>
<?php else : ?>
<ul>
<li><a href="<?php echo get_settings('home'); ?>">Home</a></li>
<?php wp_list_pages('depth=1&title_li='); ?>
</ul>
<?php endif; ?>
to this...
<div id="sub_menu">
<?php if(function_exists('wp_page_menu')) : ?>
<?php wp_page_menu ('show_home=1&depth=1&title_li='); ?>
<?php else : ?>
<ul>
<li><a href="<?php echo get_settings('home'); ?>">Home</a></li>
<li><a href="skalinaresume.doc">Resume</a></li>
<?php wp_list_pages('depth=1&title_li='); ?>
</ul>
<?php endif; ?>
If you are using 2.7, the code that you posted will not work, due to the fact that the function wp_page_menu() does exist. The following code should get you to where you want to be:
<div id="sub_menu">
<ul>
<li><a href="<?php echo get_settings('home'); ?>">Home</a></li>
<li><a href="skalinaresume.doc">Resume</a></li>
<?php wp_list_pages('depth=1&title_li='); ?>
</ul>
</div>
also, you should use an absolute path to your resume, especially if you are using permalinks.
governator1
Member
Posted 3 years ago #
thanks, the link now works. i'll look into making that an absolute path
bebarce
Member
Posted 3 years ago #
I'm having a similar issue with my site. For some reason I can get the link to appear on every page but the home page.
Upon recommendation of some support site I went to the bottom of the header.php page and added the following code after the reference to the home button.
<li<?php if (is_home()) { echo ' class="current_page_item"'; } ?>><a href="http://mywebsiteforum">Forum</a>
the instructions then said to make a similar change to a home.php but I don't see a home.php listed in my theme pages.
See. example (www.moviestupidity.com) if you click on about, you see the forum link, but its not on the main page.
bebarce
Member
Posted 3 years ago #
glee never mind, I just figured out (thanks to this thread) that replacing part of my code with this
<?php wp_list_pages('depth=1&title_li='); ?>
fixed it.