Want to add a navigation header
-
Wondering how I would go about doing this?
I want it to consist for 3-4 buttons.
I seen a thread about this a little lower down but it had been locked without a answer.
So was wondering how i’d go about this?
-
Open your
header.php
template and find the<div id="main">
near the end.Put any kind of html you want after there for navigation.
Put it before the php profile part.
Thanks a bunch!
I’m trying to copy over my nav bar from my wordpress website, would that be possible?
Every time I try and copy over the code under “main” there an place it under “main” on the forum header.php it doesn’t appear.
Give it a unique DIV ID and copy the same CSS from WP & obviously change the DIV ID name to what you have changed.
When I change it DIV ID in WP though the navbar stops working.
Look around for implementing a horizontal menu in CSS and then you will be able to have the same WP menu in bbPress
I cannot find any tutorials online, i’ve been looking all afternoon.
Any chance somebody could give me a step by step guide?
@andywilliams244 Try this for a nifty nav bar that shows at the very top of your site (maybe use this at the very top of both your WordPress and bbPress site?):
1) Check this link out: http://www.bleepingcomputer.com/forums/topic55647.html
2) What you want to do is make a really simple PHP file, lets call it “andybar.php” (if you have trouble making one copy one of your .php bbpress files and rename it)
3) Copy the code from that page into the php file. (you probably want to open with Notepad or Wordpad)
4) Fill in the links how you want them to be, like:
<li><a href="http://www.andywebsite.com">ANDY_WEBSITE</a></li>
5) Save the php file and upload it into the folder of your theme.
6) Put this in the header where you want the bar to display:
<?php bb_head(); ?>
<?php include('andybar.php');?>
<br>
</head>7) The bar should appear at the very top of your bbPress site. You can easily change the colors with the CSS inside that one php file.
You might need to play with the bbPress CSS if there is a spacing issue above or below the bar. Hope this helps!
Excellent! Works a treat! Thank you very much.
Is there a way of stretching it to make it fit the table better?
Here’s how it looks: http://www.origineuphoria.com/forums/
Here’s the code:
#navbar ul {
margin: 0;
padding: 5px;
width: 800px;
list-style-type: none;
text-align: center;
background-color: #222222;
}
#navbar ul li {
display: inline;
}
#navbar ul li a {
text-decoration: none;
padding: .4em 3em;
color: #CCCCCC;
background-color: #222222;
}
#navbar ul li a:hover {
color: #CCCCCC;
background-color: #141414;
}
Hmmm…Have 2 idea to help (not sure what the issue is and am new at this)
1) change the bar width from “width: 800px;” to maybe “width: 900px;” and see if it extends to where you want.
2) If that does nothing (it might not) you want to try and stick the
<?php include('andybar.php');?>
for the bar DIRECTLY below where your “Origin Euphoria” banner” is in the WordPress theme header (assuming its not there already).
Since that part of your WordPress CSS lets stuff go all the way to the border on each side the bar should expand and fit perfectly. (Maybe Its not the navbar css but the WordPress theme css preventing it to go all the way across.
- You must be logged in to reply to this topic.