• Resolved Shiva Poudel

    (@shivapoudel)


    Hello Steven Gliebe,

    In one of my custom widget I used wp_dropdown_categories() form field and while saving it saves ID of the category and while exporting it does export ID only. In my theme One click demo Import strategy the category ID is not matching after import in new installation and I got to fix that problem. Can you provide support for that or custom action hook where I can do changes for the correct result with ease example.

    The hackathon is to get the ID of category from its title defined by our own custom array and update the ID of category Imported by this plugin in new installation. Think, If we can defined the category from our config array for that widget and replicate the result with correct category ID ??

    Thanks!

    https://www.ads-software.com/plugins/widget-importer-exporter/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Steven Gliebe

    (@stevengliebe)

    Hi Shiva,

    I assume that is because ID’s often differ on separate installations. So, if you want to find and update by title then there are a couple actions that might help. wie_after_widget_import fires after each widget import and passes data for that widget. wie_after_import runs after all widgets are done importing.

    https://github.com/stevengliebe/widget-importer-exporter/blob/8475640e14fe15384ad989e71a92e26a66562666/includes/import.php

    Would you need a different action?

    Thread Starter Shiva Poudel

    (@shivapoudel)

    Thank you for your prompt reply Steven.

    Can you provide me some snippet to update category ID using those action?
    I tried a lot but couldn’t get any fruitful result. For example, can you please share a snippet using which I can modify the data of the specific widget’s category ID using those hooks?

    That would be really helpful.

    Thanks! ??

    Plugin Author Steven Gliebe

    (@stevengliebe)

    I’m sorry, that’s beyond the scope of support for this plugin. The plugin simply imports what it exports so if you need some additional functionality for your custom widget then you may want to hire a developer to help you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category ID are not imported correctly in new installation’ is closed to new replies.