WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Blix header problem in 2.1 (13 posts)

  1. Navjot Singh
    Member
    Posted 7 years ago #

    I read the article on how to make Blix ready for 2.1 at http://rmarsh.com/2007/01/11/blix-theme-and-wordpress-21/

    But now the problem is after using this fix it stops working on 2.0.x versions. Is there any conditional code which can be used to make it work with both 2.0.x and 2.1 versions as well.

  2. Ryan Fitzer
    Member
    Posted 7 years ago #

    Don't know why the Blix theme had to use a custom function for this except to exclude certain pages. If I were you, I would just use the normal function with these arguments:

    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>

    Do you have any pages to exclude?

  3. Navjot Singh
    Member
    Posted 7 years ago #

    They use custom code to highlight pages on header to show current page and to use hover effect. The code you are giving me is for displaying pages in sidebar. I am talking of header code.

  4. Ryan Fitzer
    Member
    Posted 7 years ago #

    "They use custom code to highlight pages on header to show current page and to use hover effect."

    The code I provided has the same features. Blix is quite an old theme and WP may not have been adding the classes to the code as they do now. I use it on my site just fine with both hover and selected states working fine.

    "The code you are giving me is for displaying pages in sidebar. I am talking of header code."

    I use this code in my header. You can put the code anywhere you like and it will work exactly the same. This will work. You may have to change a css class or two but this way it is compatible with both WP versions. The only other way I could see you overcoming this problem is to write some custom if statements that check for WP version. Seems a little silly though.

  5. Navjot Singh
    Member
    Posted 7 years ago #

    Ok...I will check your code and reply soon!

  6. Navjot Singh
    Member
    Posted 7 years ago #

    Your code seems to work fine but does not highlight other pages as selected. Anyways I have fixed the problem...see comment no. 4 at http://rmarsh.com/2007/01/11/blix-theme-and-wordpress-21/

    Anyways thanks for all the help. Topic is Resolved.

  7. Ryan Fitzer
    Member
    Posted 7 years ago #

    Read it and glad you got it working. But still, way too much work for a navigation. My code above is standard WP and like I said, you may have to change a css class or two but it does the same thing with less. The reason why it wasn't highlighting is because blix uses the class "selected" while WP uses "current_page_item". It uses "page_item" when not selected.

  8. ddunker
    Member
    Posted 7 years ago #

    See Topic 101812 for a simple solution by using WP 2.x functions instead of bx_functions (which may have been necessary for WP 1.5). This works fine with WP 2.0 and 2.1.

  9. dockarl
    Member
    Posted 7 years ago #

    A free modified version of Blix called Blix Krieg which incorporates these changes, and adds some features is available at http://www.utheguru.com. It can be dropped right over the top of an existing blix installation in two minutes flat - saves coding.

    Also backwards compatible with earlier versions of WordPress.

  10. frectis
    Member
    Posted 7 years ago #

    I use this theme and upgraded last night to Ella 2.1. Are the fixes apparently needed or can I get by without it? I don't notice anything different going on with it. My blog is at http://frectis.net/

  11. frectis
    Member
    Posted 7 years ago #

    ROFL... found my bug...

  12. dockarl
    Member
    Posted 7 years ago #

    nope frectis - blix krieg has the changes already coded in for you ;) Ciao

  13. hanksbuttons
    Member
    Posted 7 years ago #

    Thanks dockarl! I nearly had a heart attack as I just released my new webpage today and figured a simple upgrade would do nothing haha. Your method worked like a charm.

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Topic