Mass update categories?

This topic contains 7 replies, has 3 voices, and was last updated by  Paolo 8 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #51477

    Jeff B
    Buyer
    Post count: 4

    Hello!

    After importing a large number of locations, I notice that some of them did not have the category set in the CSV so they are in the backend, but not showing on the map view. I’ve been using the WordPress bulk edit function, but that is only doing one page at a time and I have several thousand places that need to be assigned to a category.

    Is there a way to bulk add the places to a category? Perhaps using a MySQL query that would set them all at once so I don’t have to go page by page?

    Thank you!

    #51494

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I would export all lsitings, correct in your CSV file and re-import to update them all:

    https://wpgeodirectory.com/docs/core-export/#export

    Thanks

    #51500

    Jeff B
    Buyer
    Post count: 4

    Paolo,

    Thank you for your response.

    We have 50k locations in the database and when I attempt an export at /wp-admin/admin.php?page=geodirectory&tab=import_export and go to the “GD Listings: Export CSV” section, I select Post Type “Places” and click the “Export CSV” button. The Elapsed time counter counts up for a couple of minutes, then stops without producing a CSV for me. My guess is that the export takes too long and is timing out on the server.

    Are there any alternative approaches that I could take? I’m comfortable with MySQL, if I need to go that route.

    Thanks again!

    #51505

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    increasing max execution time to a very high number should solve that. Pls see. https://wpgeodirectory.com/support/topic/events-csv-export-stalls-at-13s-or-4s/#post-47564

    Adding category via SQL isn’t something I ould consider even if I was super comfortable with SQL.

    You would have to add “default_category” and “gd_placecategory” and complet “marker_json” in table wp_geodir_gd_place_details. Also youìd have to add “post_categories” in table wp_postmeta.

    Let us know how you went.

    Thanks

    #56070

    corsipalestre
    Free User
    Post count: 4

    Hello,
    I need to change the dafault category on all my stored places. How can i do that?
    I tryed to modify the Exported Places CSV file but I haven’t reached my goal.

    thank you!

    #56135

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I tryed to modify the Exported Places CSV file but I haven’t reached my goal.

    What happened exactly?

    This is what I’ve suggested to do:

    Export CSV, edit and re-import to update.

    Let us know,

    #56319

    corsipalestre
    Free User
    Post count: 4

    Hi Paolo,
    in the CSV i didn’t undestand where and how set the default category.
    I have resolve the question by a Database update on 0_geodir_gd_place_detail table, default_category field.

    thanks

    #56324

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I’m really sorry I got confused. I was convinced the CSV file included the default_category field.

    I’ve asked to developers to add it. Currently the only way would be to do what you did.

    Thanks for the heads up.

Viewing 8 posts - 1 through 8 (of 8 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket