• Resolved peterebel

    (@peterebel)


    Hi,

    I’m batch-uploading dozends of Microsoft Word documents (converted into HTML using Python Mammoth) into the wp_posts table with yada_wiki as post type. The articles need to be in a certain order and to have dedicated parent posts. So when building the INSERT INTO SQL statements within my Python upload program I’m putting a pre-calculated correct sequence number into the menu_order field of wp_posts and the id of the correpsonding parent post into the parent_post field. But unfortunately it seems the yada wiki plugin doesn’t take into consideration neither the sequence nor the parent ids. Is my observation correct or am I missing something?

    Any help would be really appreciated. Thanks in advance!

    Cheers,
    Peter

    • This topic was modified 3 years ago by peterebel.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author dmccan

    (@dmccan)

    Hi Peter,

    When you create a Custom Post Type there is a choice of hierarchical is true or false. If it is true then the Custom Post Type functions like pages that have an ordering. If false then like posts that do not. Yada Wiki is set to false, so wiki articles don’t have a hierarchy.

    It may be possible to make that an option. If you aren’t in a big hurry then I can look into it.

    Best,

    David

    Thread Starter peterebel

    (@peterebel)

    Hi David,

    that would be awesome! I was thinking first to alternatively publish the articles as pages but that would have some disadvantages as well. So again, to have yada wiki posts acting like pages in terms of ordering would be super helpful! In the meantime, until you’ve possibly implememented this feature, is there any chance to call an action in functions.php to set the hierarchy flag explicitely during init? Do you have a rough idea until when you’d be able to implement the post hierarchy?

    Again, thanks a lot in advance!

    Cheers,
    Peter

    • This reply was modified 3 years ago by peterebel.
    Plugin Author dmccan

    (@dmccan)

    Hi Peter,

    I should be able to publish the change this weekend or by Monday at the latest. I have it coded but would like to do some testing.

    I have no idea how adding something to functions.php would work out. Perhaps you could change the source of the plugin so ‘hierarchical = true’ and the supports array has ‘page-attributes’ added.

    I’m adding the option but have a note that it should not be changed on a wiki with content because I don’t know the ramifications of changing it after content has been added.

    I’ll post here when it has been published then perhaps you could try it out to confirm it does what you need?

    Best,

    David

    Thread Starter peterebel

    (@peterebel)

    Hi David,

    perfect! Looking forward testing the new version!

    Cheers and have a nice weekend,
    Peter

    Plugin Author dmccan

    (@dmccan)

    Hi Peter,

    The change has been published. Please try it out.

    Thanks,

    David

    Thread Starter peterebel

    (@peterebel)

    Hi David,

    works like a charm! A thousand thanks mate!

    Best regards,
    Peter

    Plugin Author dmccan

    (@dmccan)

    Hi Peter,

    That’s great. Take care.

    David

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘menu_order and post_parent’ is closed to new replies.