Small Question - Links in Header
I was able to figure this out in the previous version of Atahualpa, but I'm stumped on this version. I love the way the layout shows the page links on the top of the header. I wanted to use the same style, but instead of page links, provide links to other things (ie: Twitter page, Facebook profile, etc.). I was able to update the header.php file with this before, but I'm unable to figure it out this time. Any help would be greatly appreciated.
Thanks! |
In header.php, find
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Wow. Thanks for the quick response. I'm most of the way there. I was able to find and add in the code you suggested. Is there a way to have it appear like the links to the pages do in one of the bars in the header?
|
Quote:
|
Update: This post is for Atahualpa up to version 3.1.7.
Atahualpa up to 3.1.7: Use Post #2 + Post #5 (this post) Atahualpa 3.1.8 and newer: Use Post #2 + Post #10 (see below) Doh - I forgot one setting. In style.css.php, find PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Thank you so much! That fixed it. Thank you very much for your help with this. I really appreciate it. I'll be donating shortly. :)
|
I wonder if I am doing something wrong with this code, because my menu bar (the one mentioned above) comes up fine...looks & works great...but it is showing at the end of the header just above the first post. I want it to be above my header image, where I would have the pages menu show. How can I adjust this?
Thanks. |
Have you put the code from post #2 before or after
PHP Code:
And if you're referring to the default page and category menu bars, their order can be re-arranged at Atahualpa Theme Options -> Header -> Configure Header Area |
Thanks. I see where I went wrong with the placement, and now it is at the top. I do have two more questions and I promise to go away :)
1). I have it at the top, but how can I position it to be below the logo bar and above the image bar? I am trying to play with that without success. 2). I can't get it to work without the %pages in the theme options. If I take that away, the formatting for the new menu bar goes away. I can not find the style.css.php file, to insert that code, but I did find one of the lines of code you mention I should edit in header.php. Should I be making changes there? Perhaps I am working in a different version of the blog. I think I have the newest 3.1.9, but those last edits of code you mention escape me because I can't find that style.css.php file in my directory. Sorry to throw these out there, but this is the last tweaky thing I want to get wrapped up. I appreciate the past help...and any future. I'm sending a small donation, cause you have been a great help! |
You're right, the above does not apply to version 3.1.8 and newer as in 3.1.8 the dynamic CSS was moved from style.css.php to header.php. You should have no style.css.php file anymore in 3.1.8 and newer.
Instead of the changes in post #5 in this thread, do these changes for Atahualpa version 3.1.8 and newer. In header.php, find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Quote:
PHP Code:
part contains all default header items as configured at Atahualpa Theme Options -> Header -> Configure Header Area To put something in between those default items, changes would have to be made to functions/bfa_header_config.php. Like in the examples above one of the two existing menu bars, %cats or %pages would have to sacrificed if you want to use one of them for arbitrary links. To use the page menu bar for this, find, in bfa_header_config.php: PHP Code:
PHP Code:
To do the same for the category menu bar instead, in bfa_header_config.php, find: PHP Code:
PHP Code:
|
Quote:
|
I have used your code for the category menu bar. Everything works fine. However when i click on certain links & that page is displayed, the hover effect does not stay selected to show the current page we are on.
For example for my normal state of "menu link" colour is blue. If i hover over the links it it goes red. If i click on the link that page should displayed, and link should stay red to show you are reading the current page. This is how the original menu works. I tried for hours but cant get it to work. Can you please help me. |
So you're using this for internal pages, not for links to outside pages (on external websites)? Because then you could just use the page and category menu as they are?
Just to go sure that you know this: There is a whole fully functional "Category Menu Bar" that you can enable by putting %cats into Configure Header Area at Atahualpa Site Admin -> Header If you still need it, the category li items get the following additional classes when they are current or parent of current For the current cat HTML Code:
.current-cat HTML Code:
.current-cat-parent HTML Code:
ul#rmenu li.current-cat a:link, |
Ha! Genius! Thanks again. Gee, I'm feeling a little sheepish at throwing another question at you...but with this method of creating a custom nav bar with links (which is working fabulously)...is there a way to make the category links work the same as they would if I went the "normal" nav bar route? Does that make sense? Basically, I would love to have a Category choice on my new nav bar, which automatically drops down the categories that are built into the WP blog. I was playing around with some code, but I am primarily an HTML designer...and though I usually can manipulate PHP pretty well...most of it still escapes me. :)
|
Quote:
I am using external links. I have tried your suggestion by creating additional class. But It does not work. It seems like it is over ridden by the settings in Site Admin -> Header. Basicly i am using the category menu as it is but want external links. I want the hover & active link to work like the original. In my case the hover works perfectly but the active link does not work (it goes back to default state). |
Hmmm - this thread has got confusing
I'm using 3.1.9 and I want to create external links in the page menu do I take it that I add the code in post #10 and then use the other stuff from post #2 ?? |
Quote:
I updated post #5 to make that clear. |
Quote:
PHP Code:
|
Quote:
"Current" would not be possible with external links. Web site A would not know that you're on page X of web site B. That would require Javascript and tricky cookie settings, probably with a third domain/subdomain to handle the cookies for both domains. "Active" should work, but I am not sure how persistent that "active" highlighting is: HTML Code:
ul#rmenu li.current-cat a:link, |
unfortunately the above code does not work. Where are you placing the code in : themes/atahualpa/style.css
|
Quote:
The order CSS is being processed is style.css -> Theme Options (header.php) -> CSS Inserts (header.php bottom) |
Quote:
Thanks for the quick reply, but the categories are no longer dropping. Or, rather the menu is no longer dropping. I have the arrows, showing that it "thinks" it should be showing me sub-menus...but nothing happens. Any other thoughts? |
Quote:
|
Quote:
:) Thanks SO much! |
My bad, I lost track about the context in which that code would be posted (inside php tags)
The complete replacement code as per post #11 in this thread, first part (for page menu bar) would be PHP Code:
|
Quote:
You've been the best. It is working now. I am playing around with trying to get the drop down to be beneath the main category button. I'll see my way through. Frankly, that is how I am learning so much about all of this side of development (instead of just HTML design), and you have been such a great help!!! |
You're almost there... The trouble you're still having is because you're closing the parent's <LI> too early. Compare the following with your code (Note: I left out the opening 2 div's and 1 ul and their closing counterparts because you have those right):
HTML Code:
<li><a href="index.php">Home</a></li> |
I caught one place I did that, and realized how the heck would it know to do something if I closed it off before telling it what to do. I'll go through the code carefully, and check all areas to see where else I messed up. I got it to work at one point, but it threw the categories onto another line. Yikes....trial and error, I'll tell ya. Trial and Error!
More to come... |
Perhaps I am missing something, because it all appears to be closing at the right part. The issue is that the category has a choice on the main bar, then drops down with another category choice and then flys out to the right with the actual categories. I was trying to have the categories drop down from the main choice on the top. When I remove the following lines:
HTML Code:
<a href="#">Categories</a> <ul class="rMenu-ver"> HTML Code:
// Page Menu Bar |
The problem is that "rMenu-ver" appears twice in the "Category" path but it should only appear max once below a top level parent.
Since you have 2 levels in your Wordpress-created categories (parent "categories" and their childs) you can use this easier version below and use that existing parent "categories" as the top level. The version from above would have been for a flat list of only-top-level categories. This is something I had not thought about. "rMenu-ver" can only appear once below each top level parent, and including the categories into the page menu bar via bfa_hor_cats as shown here in this thread will only work if 1) The included categories are all one flat level -> use code from post #30) 2) or they START with a parent that contains all child categories, without further levels (you can set the category order only to some extent at Atahualpa Theme Options -> Category Menu Bar, to bring the parent cat into the first place) -> use code from post #31 = this post here 3) otherwise bfa_hor_cats.php would have to edited, too, but this thread is complicated enough as it is Move all child categories to the first level and use the code from post #30 Or Leave them as they are (parent category "categories" with childs) and delete the hard coded "Categories" parent like this: PHP Code:
|
Ha. I had forgotten about creating that silly "categories" category. I didn't intend to keep that, and since removing it I see what you are talking about. It works! It's amazing, and you're talented. I have to see if the person I am doing this for intends to have top level categories only....or will have children categories that I need to take the above code into account.
You've been wonderful. A wealth of information and knowledge. Thanks so much!! |
hello
I'm using 3.1.9 of your excellent theme. I believe it should be packaged with Wordpress as the "Only theme you'll ever need" I have followed your instructions in post #10 and #2 and have the following http://digitalvillage.org.uk/blog/ almost right but the extra links appear on a new line - how do I get them to follow on in a straight line from the other links? Thanks |
Quote:
HTML Code:
<li><a href="http://digitalvillage.org.uk/blog/?page_id=53" >Research Blog</a></li> HTML Code:
<li><a href="http://digitalvillage.org.uk/blog/?page_id=53" >Research Blog</a></li> |
I don't understand
I've edited header.php as per posts #2 and #10 I don't see the following HTML in header php HTML Code:
<li><a href="http://digitalvillage.org.uk/blog/?page_id=53" >Research Blog</a></li> PHP Code:
|
This thread got a bit messy, but...
The post #2 plus the required extra changes (post #5 for Atahualpa up to 3.1.7, and post #10 for Atahualp 3.1.8 and later) was for replacing the whole page menu bar and using its CSS & Javascript for a menu bar full of arbitrary links instead. You want to append arbitrary links to the page menu bar (and keep using the page menu bar with its "Page" page links). To do that find, in bfa_header_config.php, line 11-24, find this: PHP Code:
PHP Code:
|
And to append 3 levels of arbitrary links to the page menu bar (instead of only 2 levels as shown in post #36 above), use this as the replacement code in bfa_header_config.php:
PHP Code:
|
Thanks Flynn - that's exactly what wanted. You're the top WP theme dude
|
Thank You!
Very helpful! That's what I needed too. Any chance of integrating this into the "Page Menu Bar" section of the theme? Also, do these links have to apear after the other internal pages or is there a way to set their order too? I would like intersperse them with the other page tabs if possible. Asking to much? ;) |
I had this same question and was diven a very simple solution by a Mod at the WP forums.
Quote:
|
All times are GMT -6. The time now is 01:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.