issue with posting in wrong cpt
This topic contains 9 replies, has 4 voices, and was last updated by Alex Rollin 8 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
June 23, 2018 at 4:35 pm #435923
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,
JoelJune 23, 2018 at 4:55 pm #435927Hi 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 CPTsThanks,
Stiofan
June 23, 2018 at 7:44 pm #435934This reply has been marked as private.June 24, 2018 at 1:57 pm #435974Hi. Any luck with this yet? I have a listing stuck in Pending status. Thanks
June 24, 2018 at 6:44 pm #435997Can anyone please respond back to this? I need to get it resolved. Thanks.
June 25, 2018 at 4:05 am #436022Hi Joel,
Thanks for your reply and I’m sorry for the delay. Just notified @stiofan to take another look at this.
Thanks!
June 25, 2018 at 8:12 am #436041Hello,
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.
June 25, 2018 at 11:11 am #436074I 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
June 25, 2018 at 1:03 pm #436086Stiofan – 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.
June 25, 2018 at 3:31 pm #436100You are very welcome, write back if you have more questions.
Thanks 🙂
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket