• I assigned a parent category to my categories and they looked fine in Edit but not on my blog.

    I also tried Page, using parent, but it didn’t how i.e. Japan and China under Asia, Germany under Europe.

    Any help is greatly appreciated

    https://www.bonvoyage.ireneeng.com/

    Thank you.

    Irene Eng

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi

    You may need to make an adjustment to the syntax of the wp_list_categories line in sidebar.php, to tell it to display your categories hierarchically.

    https://codex.www.ads-software.com/Template_Tags/wp_list_categories

    Thread Starter ireneeng

    (@ireneeng)

    Thanks ..
    Could you post the code here and indicating where to insert?
    Sorry I’m not good at penning a code or two .. must be the only Chinese who doesn’t know programming. I’m just so worried that one wrong word in the sidebar.php would ruin the whole site .. if not bring down the entire empire .. .. ??
    Many many thanks.

    Irene

    Hi – You will need to post the line of code that has wp_list_categories in it, from your sidebar.php

    Thread Starter ireneeng

    (@ireneeng)

    <?php wp_list_categories(‘show_count=1&title_li=<h2>’.__(‘Categories’, ‘elegant-grunge’).'</h2>’); ?>

    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    <?php wp_list_bookmarks(); ?>

    I hope this is the right one .. Thank you so much ..

    Hi

    I don’t see any trace that you have parent categories assigned. Here are the categories from your sidebar

    Africa
    Aswan
    Bahamas
    Beijing
    Cairo
    China
    Dominican Republic
    Egypt
    General
    Luxor
    Nicaragua
    Paris
    Schw?bisch Hall
    Tianjin

    how are they supposed to display?

    example:
    Asia
    — China
    —– Beijing
    Egypt
    — Luxor
    — Cairo
    Central America
    — Nicaragua

    Draw out the list the way you want them displayed, with indentations

    Thread Starter ireneeng

    (@ireneeng)

    https://www.bonvoyage.ireneeng.com/?p=55

    It shows in the ‘Edit’ mode ..

    Yes, this is the way I’d like it to appear ..

    Asia
    — China
    —– Beijing
    Africa
    –Egypt
    — — Luxor
    — — Cairo

    Thank you very much

    Irene

    Are you displaying the sidebar categories with a widget or from code in the sidebar.php file?

    In Admin, go to Appearances button in left column, and then click Widgets.

    See if you have any widgets active in the sidebar column. If you have even one widget active on the sidebar then the rest of the sidebar code in sidebar.php does not get used at all, thus no control over changing anything. If there are active widgets, write down which ones they are and their settings. Then deactivate them.

    If you find no widgets are being used please post your sidebar.php code in a pastebin at https://wordpress.pastebin.ca/ and post the URL to the code here.

    Thread Starter ireneeng

    (@ireneeng)

    Dear Stvwlf,

    THANK you so much for your patient and help. It worked: the Category Widget actually has an option for ..
    -dropdown
    -post counts
    -hierarchy
    Sorry that I didn’t look (probably didn’t know where to look). I’m just so reliefed that I don’t have to fuss with the codes.

    Thanks.

    Gratefully,
    Irene

    One more question .. JK .. relax ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘category hierarchical is now showing’ is closed to new replies.