• Resolved kebikec

    (@kebikec)


    Hello,

    I have a category structure with 4 levels in my posts.
    (some posts stay at level 2 or 3)

    As you can see from the attached photo, I tried to write the category structure in several formats, but I could not figure out how to write it.
    https://imgtr.ee/images/2024/09/05/e04958c6687134c9e15f9832c538ab44.png

    {Categories}{Categories-2}{Categories-3}{Categories-4}
    {Categories}/{Categories-2}/{Categories-3}/{Categories-4}

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter kebikec

    (@kebikec)

    let me answer my own question ??

    {Categories}>{Categories-2}>{Categories-3}>{Categories-4}
    it’s supposed to be like this.

    In my test, I only used a data with 2 levels full.
    {Categories-2} came selected.
    But I want all filled levels to be selected.
    How can I write this?
    (I looked at the documentation and there is nothing)

    Plugin Author smackcoders

    (@smackcoders)

    Hi @kebikec,

    Thank you for your patience! For setting up your category structure with multiple levels, you should use the following format:

    <post_category>parent,parent>child,child>grand-child,Uncategorized</post_category>

    In this format, each level is separated by a >, and you list multiple categories separated by commas.

    For example, if you have categories like:

    • Parent
    • Child
    • Grand-child
    • Uncategorized

    You would structure it as shown. This should allow you to properly select and import all levels of categories.

    To see how it works, you can refer to this sample XML file: https://drive.google.com/file/d/1l6ICVESCEMaMKF7HMeFmMtcyuuEYvXj8/view?usp=sharing

    Please let me know if you need further assistance!

    Anthony

    (@hcmobilemedia)

    I have a question along the same lines, only with importing a .csv file rather than XML.

    I have a Parent>Child>Grand-child category structure. To keep it clean on the front-end, I only select the Grand-child category, not the Child or Parent. How would I enter my category into the .csv in order to replicate this in a bulk import, where only the Grand-child is selected? When I enter Parent>Child>Grand-child into the .csv all three are selected in the post.

    Plugin Author smackcoders

    (@smackcoders)

    To achieve the desired result, please enter only the Grand-child category name in the ‘post_category’ field of your import file. This ensures that only the Grand-child category is selected during the bulk import, keeping the Parent and Child categories unselected.

    Anthony

    (@hcmobilemedia)

    Ahh okay. Thank you. That worked. For some reason I didn’t think it would recognize the existing category or the fact that it was a child category, but it properly detected existing categories and their grand-child or child level.

    Plugin Author smackcoders

    (@smackcoders)

    Glad to hear it worked for you! ?? If you need any more help, feel free to ask.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.