• 投稿ページを階層にして、パンくずリストを作成したいです。
    しかし、投稿タイプの設定ページには下記のように書いてあります。

    「パンくずリストを階層表示するとき階層化の基準として使われるものを上記から選択します。”親投稿”オプションを使用するには追加のプラグインが必要です。追加のプラグインをインストールしていない通常の状態では、”投稿”は階層性を持たないからです。」

    上記の“追加のプラグイン”とは具体的に何ですか?詳細を教えて下さい。

    Hi,
    I want to create a breadcrumb traduction with a hierarchy of posts pages.
    However, the post type settings page says:

    Select from the above items to be used as the criteria for hierarchical display of breadcrumbs. An additional plugin is required to use the “Parent Post” option. This is because “posts” do not have a hierarchy under normal conditions without any additional plugins installed.

    What exactly are the “additional plugins” above? Please tell me the details.

    The page I need help with: [log in to see the link]

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

    (@mtekk)

    For non-hierarchical post types, you need some custom code to enable a post parent metabox in the editor. A reference plugin exists on github https://github.com/mtekk/Post-Parents you may need to modify it to handle the post types you want to use (both the CPT for the metabox to show up in, and what posts show up in the parent post dropdown).

    Thread Starter hal09

    (@hal09)

    Thank you for your support.
    I uploaded the Post-Parents directory.
    And the “Parent” metabox appeared on the post page.
    However, I have additional questions.

    question 1
    Is the Parent metabox a setting for specifying my parent?

    question 2
    Parent metabox had only fixed page as an option.
    How can I specify a specific post?

    Thread Starter hal09

    (@hal09)

    Hi,
    What is the status of this case?
    I need help.

    thank you.

    Plugin Author John Havlik

    (@mtekk)

    The parent metabox allows setting a parent for the post, the reference plugin takes advantage the WordPress editor will save a parent_id for you if it is specified (so it’s literally a matter of setting the parent_id via some interface, hence the metabox).

    As I mentioned in my previous reply, the reference plugin just adds the Page post type, if you wanted some other post type you need to modify what is in the parent_meta_box function. The call to wp_dropdown_pages may need to either have a different post type specified in its arguments, or completely replaced (I don’t remember if it actually allows specifying a different post type).

    Thread Starter hal09

    (@hal09)

    Thanks for your reply.
    However, it is very advanced content for me, so I may not be able to understand everything correctly.

    Is my understanding below correct?

    [the breadcrumb traffic that I want to create]
    TOP page > post X > post Y

    -The function of the reference plugin (=”Post Parents”) is only to specify its own parent.
    -In other words, in the above example, specify post X in the parent metabox of post Y.
    -Specifically, you can set your own parent by specifying the “parent_id” of the parent post.
    -However, by default in wordpress, it is not possible to specify the post type of post X.
    -In order to make this configuration change, it is necessary to change the part called “wp_dropdown_pages” in the parent_meta_box function.
    -Probably it can be done by the above method, but there is no official support.

    best regards

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Post page hierarchy’ is closed to new replies.