Simple problem
-
i am having a very simple issue with my blog lay out. i have it very close to what i want but am having a silly problem with the links at the top. here is my site. as you can see, i am trying to create a static home page and have a link to the blog as a separate page. note that when you click the blog link you lose access to the link bar, and when you click the home link on the right the home link on the left goes away… i would like it to be structured as
[home] [portfolio] [contact] [blog]
and not have the links disappear at any given point..
any advice would be greatly appreciated :]
-
Here is a good video tutorial on how to do what I think you want.
thank you that solved part of my problem. still not seeing the home link when i click on it, and still not seeing any links on the blog page.
You don’t see ‘Home’ on the home page because it is suppressed in the function veryplaintxt_globalnav() at line 5 in functions.php. ‘Home’ shows on all except the home page.
I can’t tell about the links on the blog page because I can’t look at your database to see what posts are there.
// Produces links for every page just below the header function veryplaintxt_globalnav() { echo "<div id=\"globalnav\"><ul id=\"menu\">"; if ( !is_front_page() ) { ?><li class="page_item_home home-link"><a href="<?php bloginfo('home'); ?>/" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?>" rel="home"><?php _e('Home', 'veryplaintxt') ?></a></li><?php } $menu = wp_list_pages('title_li=&sort_column=menu_order&echo=0'); // Params for the page list in header.php echo str_replace(array("\r", "\n", "\t"), '', $menu); echo "</ul></div>\n"; }what part do i edit ?
and what do you mean by what posts are there ? shouldn’t it not matter because the links should be there on the top bar regardless ?
You can get the Home link by changing ‘!is_front_page()’ to ‘true’ (without the quotes).
As for the blog, since the ‘Hello World’ post shows, I can’t tell why other posts are not there. I thought it might be possible that there were no other posts, only pages. Other than that, I’m afraid I don’t have any other ideas – sorry.
oh maybe i miss communicated what i was trying to say.. i just set this up yesterday (first time using wordpress and dealing with anything more complex than very basic html) so that is the only post.
what i was getting at was that when you click to the blog page all the links disappear from the top bar with the links to the various pages :]
and thank you again for the help, it means a lot.
I’m having trouble reproducing the problem. Can you tell me exactly how you set up the Blog page?
okay so, reference this image…
http://merajj.com/t/problem1.jpg
so when you click the blog tab the links move from the top bar to the side bar, and i would like the top bar to remain static throughout each of the pages. basically i just need to prevent the theme from hiding it.
i set up the blog page per the instructions in that video and the instructions on the wordpress site which tells you to create a page, leave it blank, and then point the blog to that page.
OK – I think I have what you need.
First, change the word ‘true’ that I gave above to ‘false’.
Second, edit style.css (make a backup!) line 25 that starts ‘body.home div#globalnav, . . .’. You want to delete from the front of the line everything up to div.access. I made a copy of the line, commented out the original and edited the copy as below:
/* body.home div#globalnav,body.archive div#globalnav,body.search div#globalnav,body.four04 div#globalnav,body div#globalnav ul li ul,div.access,body.single div.sidebar,body.page div.sidebar,span#theme-link span.additional-name,span#theme-link span.family-name{display:none;} */ div.access,body.single div.sidebar,body.page div.sidebar,span#theme-link span.additional-name,span#theme-link span.family-name{display:none;}One more thing, set your Home page back to ‘Main page (no parent)’. You may need to set the order of your pages so ‘Home’ appears first in the menu.
Hope that takes care of your problems!
okay, so this looks perfect here:
http://davidmendolia.com/?page_id=13
and this is with the value in the functions.php file left as true. but ! when i navigate away from this page to any of my other pages you notice that another home has been inserted into middle of the other links, and the spacing is broken between all the links as well (compare between the link i sent and by clicking any of the other pages)
so close :/
also this is how my edited code ended up looking to get the link bar to look how i wanted it, part of what you had created a strange link at the top that said ‘go to content’ or something odd like that.
body.home #globalnav ul li ul,div.access,body.single div.sidebar,body.page div.sidebar,span#theme-link span.additional-name,span#theme-link span.family-name{display:none;}The other Home will go away if you change ‘true’ to ‘false’.
The ‘go to content’ line comes from ‘div.access’ being removed or changed. Leave that on the line, but take out ‘body.home #globalnav ul li ul,’ Make sure you get the comma after the last ul.
okay, now its just the
order
spacing
top line turning bold on blog page..The order is controlled by the Order that you assign to your Pages. Edit each page and set the Order to suit yourself.
The spacing and top line turning bold are probably controlled by the style.css. I’m afraid you’ll have to figure those out for yourself.
oh ! i got the spacing done.. now its just the line going bold for some reason. but that’s all good for now. thanks a lot for the help man !
You are welcome! Please mark the topic Resolved.
The topic ‘Simple problem’ is closed to new replies.