• gorimatsu

    (@gorimatsu)


    Is the following structure possible?
    Thank you.

    Top > Parent category > Child category > Parent post > Child post

    ★ Category is WordPress default category setting
    ★ Posts are original items set in functions.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Havlik

    (@mtekk)

    This is possible as long as a couple of conditions are met. The first is that the child post’s post_parent field set to the id of the parent post. Secondly, the parent post needs to be a member of the child category. Lastly, the category taxonomy type needs to be set as the Hierarchy for the post type in question in the Breadcrumb NavXT settings page.

    Provided the above is true, then you can use the “Hierarchy Use Parent First” setting for the specific post type within the Breadcrumb NavXT settings page to enable the type of breadcrumb trail you are after.

    Thread Starter gorimatsu

    (@gorimatsu)

    Thank you very much for contacting me.

    I tried the following.
    It didn’t work.

    [1] Added to functions.php

    function registered_post_hierarchical ($ post_type, $ post_type_object) {
    if ($ post_type ==’post’) {
    $ post_type_object-> hierarchy = true;
    add_post_type_support (‘post’,’page-attributes’);
    }
    }
    add_action (‘registered_post_type’,’registered_post_hierarchical’, 10, 2);

    [2] Use the menu generated in [1] to specify the parent post from the edit screen of the child post.

    [3] Parent posts are members of the child category

    [4] Breadcrumb NavXT settings
    Post / Post hierarchy → Parent post

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘About multi-level’ is closed to new replies.