Bulk import and categories

    • Mikel Ecenarro
      Participant
      # 2 months, 3 weeks ago

      Is it possible to asign private files and pages created via bulk import to categories? what tag shoud I use in the Json?

      Thanks!

    • Matias Larralde
      Keymaster
      # 1 week, 3 days ago

      Hi Mikel,

      Sorry for the delay, and thanks for your message!

      The categories key can work, but only with post types that support categories (like regular posts). Make sure to use numeric category IDs, like:

      "categories": [1]

      For example:

      [
        {
          "type": "cuar_private_file",
          "title": "Confidential document",
          "content": "This is a file.",
          "categories": [12, 34],
          "owners": {
            "usr": [3]
          },
          "attachments": {
            "document.pdf": {
              "method": "move",
              "caption": "Attached file"
            }
          }
        }
      ]

      Note that for custom post types like cuar_private_file, categories may not be supported unless specifically added via code or an add-on.

      Let us know if this helps or if you have further questions!

      Best regards,

      The WP Customer Area Team

Viewing 1 reply thread

You must be logged in to reply to this topic.