issue with posting in wrong cpt

This topic contains 9 replies, has 4 voices, and was last updated by  Alex Rollin 5 years, 10 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #435923

    joel phillips
    Expired Member
    Post count: 82

    On the site, I have created multiple cpt’s as categories. Problem is that users will occasionally post in wrong cpt. For instance user posted a “Merchandise” listing in a “Blockchain” CPT. I have to move that listing but am running into several issues.

    1. Is there any way in the existing platform to move the listing from one cpt to another

    2. If I had to create a script, I see the pending listing in xx_geodir_gd_blockchain_detail to pull the listing from, but do not see an xx_geodir_gd_place_detail to post it back into. Where are gd_place listings posted?

    3. I only see three detail tables but have 8 categories. Are these tables created when a listing is created?

    Thanks,
    Joel

    #435927

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Joel,

    I am a it confused about this but it might just be your use of the terminology between CPT and category.

    1. No
    2. That table should exist.
    3. You should have a table for each CPT, its created when you create the CPT.
    Categories don’t create tables just CPTs

    Thanks,

    Stiofan

    #435934

    joel phillips
    Expired Member
    Post count: 82
    This reply has been marked as private.
    #435974

    joel phillips
    Expired Member
    Post count: 82

    Hi. Any luck with this yet? I have a listing stuck in Pending status. Thanks

    #435997

    joel phillips
    Expired Member
    Post count: 82

    Can anyone please respond back to this? I need to get it resolved. Thanks.

    #436022

    Kor
    Moderator
    Post count: 16516

    Hi Joel,

    Thanks for your reply and I’m sorry for the delay. Just notified @stiofan to take another look at this.

    Thanks!

    #436041

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    It might help if we can look at your setup. Please post your site URL and WP Admin credentials in a private reply so we can see your settings.

    If you are asking how to move listings from one CPT to another, then there is built in export and import for listings.

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

    If you want to automate that in some way, you could add a custom field checkbox for ‘export’ and then build an app against the REST API to query for listings with that field, GET, and then POST to different CPT, and delete them.

    Documentation for the API is here. https://wpgeo.directory/rest-api/

    If you have questions about implementation for the API we will be happy to help.

    For other questions about tables, we will need to see your settings.

    #436074

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I am guessing the other tables are there but are on page 2 (usually paging is at the top of the list). There is no automated way to move the listings and if you were to build a script you would need to account for any missmatch in fields.

    Stiofan

    #436086

    joel phillips
    Expired Member
    Post count: 82

    Stiofan – you were right. Thanks. I do not use PHPAdmin often and did not realize it did that.

    Alex – I think that is the best we will be able to do so will create a hidden, admin only field where I can mark ‘for_export’ and then can export that field. As for import, I understand what Stiofan is saying that, while the cpt’s are fundamentally the same now, we will have to map them into the proper format prior to importing them into another cpt.

    I will look into the api.

    Thanks for your help guys.

    #436100

    Alex Rollin
    Moderator
    Post count: 27815

    You are very welcome, write back if you have more questions.

    Thanks 🙂

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

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

Open Support Ticket