WordPress.org

Ready to get started?Download WordPress

Forums

Navigation: Category Selection (16 posts)

  1. katie1
    Member
    Posted 8 years ago #

    After searching the support section and Codex files for neigh on two weeks, I’ve finally succumbed to penning my questions here.

    It’s got to the point that I’m beyond frustrated; I’m almost ready to give up on WP and go back to using Frontpage, but if I do that I miss out on so much, which naturally I don’t want to do. So here’s my problem...

    <u>Horizontal menu</u>
    I used the CSS I designed in Frontpage 2003, modified some of the coding to support WordPress & php and I’m eager to get it on my site. However the horizontal menu doesn’t function properly (or even at all) because it has no destination links - at least I DON'T believe that it does, is probably more appropriate.

    I’ve made the horizontal menu my primary navigation for the site so it’s important that I understand how WP & php works. In Frontpage, if I wanted a primary navigation link to go somewhere, I just hand coded the destination page link into the navigational structure and it would work. But here? I’m confused. My existing HTML in header.php

    <div id="header" title="navigation">
    <div id="mainnav">
    ">Home |
    Articles |
    Topics |
    Submissions |
    Store |
    Members</div>
    </div>

    After reading Codex, I’ve inserted <?php echo get_settings(‘home’); ?> for the home tab, and it works, but for the others I haven’t been able to find any information that will advise me on how to insert an individual category so that when I click on “articles� or "topics" or Submissions" in the primary navigation, the page will reload and display all associated category posts exclusively for that category and nothing else.
    (I hope you understand my explanation).

    I need to point out here that I don’t believe using the exclusion function in the category php code is the right way to go about this simply because as my site grows I will have to manually add the new categories that reside in my sidebar to the exclusion function code and that seems rather ridiculous to me.

    Is there a specific is_function or get_function or some other function that I can insert between the navigational tags that will call only the category: Articles or Topics or Submissions, etc, etc whenever anyone clicks the primary navigation? At the moment I’m flying by the seat of my pants; I’ve inserted:

    Articles

    and that seems to work now, although yesterday it didn't work correctly. While the page reloaded under, I assume, articles, ALL POSTS displayed in the articles section even though I nominated specific category sections for each individual post. Silly, huh?

    Anyway, it seems to work now. I tested the primary navigation today and now only relevant posts are showing under the selected category within the main navigational bar. So my question is: is this right? Have I inserted the right code within the tags? Is this standard practice for anyone designing a horizontal navigational menu?

    Any help would be greatly appreciated. Thanks heaps.

    PS: I have two other questions which I have submitted under different topics, so hopefully someone will take pity on me and reply :)

    Kate

  2. katie1
    Member
    Posted 8 years ago #

    Oh, dear. What a dreadful mess I've made! How on earth is anyone able to make sense of all that?

    Sorry folks. Here's the relevant inclusions surrounded by the code tags.

    <div id="header" title="navigation">
    <div id="mainnav">
    Home |
    Articles |
    Topics |
    Store |
    Members</div>
    </div>

    articles

    I had to omit the href completely because it was converting the into a proper hyperlink. So apologies anyone - and please don't click it.

    Kate

  3. katie1
    Member
    Posted 8 years ago #

    Ahhh!

    (Yep - she's reaaaallll cluely, this one.)

    God! I'm so sorry. What a mess! Look, this is what I typed between the a tags. wordpress / category / articles

    Hopefully this will show instead of converting into a damn hyperlink.

  4. katie1
    Member
    Posted 8 years ago #

    I've resolved my own problem (above), but now have another.

    I've read, and followed exactly the CODEX forumla for dynamic highlighting of menus. I have a simple horizontal menu that displays categories - I also used the is_fuction, as suggested at the end of the article but it didn't work and there wasn't any highlighting on the current tabbed menu.

    My simple horizontal menu is:

    home
    articles
    topics
    store
    members

    each "category" is sitting between a tags - there's no ul or li tags, as I don't really require them in the markup.

    Can someone please advise how I can highlight the current 'category' tab in my horizontal menu please. I'm very proficient with HTML & Frontpage, so understanding CSS is relatively simply. Conquering PHP has me stumped.

    thanks

  5. jwurster
    Member
    Posted 8 years ago #

    I did a search for "horizontal menu" and found this topic http://wordpress.org/support/topic/36020 which might be helpful.

  6. katie1
    Member
    Posted 8 years ago #

    Thanks jwurster. I appreciate your input.

    I've read them both threads numerous times trying to get my horizontal menu to work.

    I've very savvy when it comes to html & css, so defining my markup and structure css is ok - I just can't seem to marry it up with PHP.

    The highlighting doesn't work using the dynamic menu version nor can I use the other thread because my tabs are "categories" - I have tried to resolve this but to no avail.

    do you have any other thoughts on the matter?

  7. Anonymous
    Unregistered
    Posted 8 years ago #

    katie1,

    For future reference, please make use of the tags. While it's not perfect, it does stop some code from being interpreted.

  8. katie1
    Member
    Posted 8 years ago #

    Thanks Mark for the advice, but I actually did use the code tags. I put the htmal between proper code tags but still it turned out like such:)

  9. Anonymous
    Unregistered
    Posted 8 years ago #

    Hrm... well, in that case, you may want to consider posting the code as a text file on your website and linking to it from here.

  10. katie1
    Member
    Posted 8 years ago #

    Thanks for the advice. I'll take it under consideration.

  11. katie1
    Member
    Posted 8 years ago #

    Ok. I'm assuming that you want to have commenting on your page, and that your page isn't really a page, but a post?

    From what I've read these last four weeks, the ability to comment on a page isn't something that's available to us.

    Commenting on a post I believe is fine. Can you clarify if your page is a page or if its a post? I'm using Blix myself, so I might be able to help you out some.

  12. jwurster
    Member
    Posted 8 years ago #

    I think I can help you or at least I am willing to try. If you could give me a link to your site, that would help.

  13. katie1
    Member
    Posted 8 years ago #

    thanks jwurster, I'd appreciate any help you can give me

    strictyromance.com

    css 9style.css0

    /***************
    Main Navigation
    ****************/

    #mainnav {
    float: right;
    padding: 0 15px 2px 0;
    margin:0;
    background: transparent;
    color: #333;
    text-align: right;
    }

    #mainnav a:link, #mainnav a:visited, #mainnav #current {
    color:#666;
    text-decoration:none;
    }

    #mainnav a:hover {
    color: #fff;
    text-decoration: none;
    background:#b3a191;
    }

    #current {
    background: #b3a191;
    color:#fff;
    text-decoration: none;
    }

  14. jwurster
    Member
    Posted 8 years ago #

    Unfortunately it is under construction. Where are you testing?

  15. katie1
    Member
    Posted 8 years ago #

    Sorry. thought I put the right url in

    try: http://www.strictlyromance.com/wordpress

    And thanks a bunch!

  16. nearlythere
    Member
    Posted 8 years ago #

    katie1 - i was always having similiar trouble using those backticks, until i was pointed to pastebin:

    http://pastebin.com/

    you go there, paste in your code, and link to it. it's wonderful wonderful!

    i found your post here because i am searching for more info on making a menu, based on what i read in the codex:

    http://codex.wordpress.org/Creating_Horizontal_Menus
    http://codex.wordpress.org/Dynamic_Menu_Highlighting

    looks like you sorted yours out on your site?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags