Hi I just sent the following to [email protected] but they told me to post here instead... I'm currently in the process of building a hostel-directory website using the GeoCraft theme. Everything seems great so far, but I've hit a problem which is currently taking me some time to fix. I uploaded 700+ listings using the CSV import function - the import seems to have worked correctly, the status was definitely set to 'publish' and there were no obvious problems. The issue I have at this point is that even though the listings have content - they're not showing on the front-end pages. The only way I can get them to show is by manually editing each of the business listings and simply clicking 'Update' on each one of them. The listing then instantly publishes correctly and the descriptions appear. I've genuinely gone through all the settings including free listing checkboxes, listing options, custom field settings and have scoured the support forums looking for a solution and have even edited multiple files with snippets of code in an attempt to fix it. Here's an example of a post that has a description which doesn't show when the post is viewed: http://hostel.info/wp-admin/post.php?post=3066&action=edit http://hostel.info/listing/yellow-submarine-backpackers-brisbane/ If you could have a look at this and get back to me at your earliest convenience that would be most helpful. My website is www.hostel.info. Thanks in advance! Dave.
Hello Dave, Please provide the following information listed below. Thread Link: http://www.inkthemes.com/community/threads/listings-not-showing-up-correctly.6182/ Your Website URL: WordPress Username: WordPress Password: Send this information on our email at [email protected] I will check and resolve your issue
Hi Nitesh Thanks for your reply - I thought this might happen. As I said in my first email - I already emailed [email protected] and the reply told me to post here. So now I posted here and you've told me to email [email protected]. Can I ask - why the so obviously illogical support process...?
Hello, I have checked your dashboard. This problem is occurring because when you have imported csv file, Free listing active period was set to 0 year. so all imported listings expired instantly no metters afterwords you changed it to 10 year. So the solution is remove all your listings once and again import csv file. All will work fine.
Thanks Nitesh. I'd really rather not remove and re-upload my entire set of listings, for obvious reasons! Could I not use (something like) the following code to mass-update the listings...? global $wpdb; $data="SELECT * FROM wp_posts WHERE post_status = 'draft'"; $queries = $wpdb->get_results($data); foreach ($queries as $query) { echo $post_id=$query->ID; $meta_key='gc_listing_duration'; $post_status='post_status'; $posttable='wp_posts'; $meta_value='06/20/2013 07:15:45'; update_post_meta($post_id, $meta_key, $meta_value); $wpdb->update($posttable,array($post_status =>'publish'), array( 'ID' =>$post_id ),array('%s'),array( '%d' )); } Taken from this thread... http://www.inkthemes.com/community/threads/mass-re-activate-listings.5995/#post-22597 Surely there must be a better way of updating all the listings in one go rather than deleting and re-uploading them all...?
Hello, Yes definitely it is a better way to update expired listing. You can use it. In previous posts i was just trying to let you know the correct process of csv upload. That's why not provided you this solution.
Hi Nitesh I tried the code and it didn't work. I changed the status of 5 listings to 'Draft' and then inserted the code (which updates 'draft' posts). For those listings - the expiry date was successfully updated, but the description field still didn't show on the site. The only thing that works is to manually edit the listing and click 'Update'. Nothing else seems to work. But I can't manually edit and click 'Update' on 700+ listings as that would take a long time... Might you be able to try to insert the code yourself and try it please? I've tried so many things and (I'm comfortable with editing code) so I've tried all sorts of snippets of code and nothing else seems to work...
Hello, I have checked your dashboard. the problem is. You have leaved "package_type" column blank in the csv file you have uploaded. That's why description field is not working. So for this time it is compulsory for you to delete all listings and upload csv file again. Note: Don't leave "package_type" column blank in the csv file you are uploading. Fill it either "free" or "paid". ====================================== Reason why code not working. You have changed $meta_value='06/20/2013 07:15:45'; Edit date and set listing active period. It will work. global $wpdb; $data="SELECT * FROM wp_posts WHERE post_status = 'draft'"; $queries = $wpdb->get_results($data); foreach ($queries as $query) { echo $post_id=$query->ID; $meta_key='gc_listing_duration'; $post_status='post_status'; $posttable='wp_posts'; $meta_value='06/20/2013 07:15:45'; update_post_meta($post_id, $meta_key, $meta_value); $wpdb->update($posttable,array($post_status =>'publish'), array( 'ID' =>$post_id ),array('%s'),array( '%d' )); }
Hi Nitesh Thanks for your response. Firstly - obviously I did change the $meta_value date from 06/20/2013 - that date is in the past, so I changed it to a date in the future. The code worked fine and updated the expiry date on each of the listings, but as I've said all along - that is not the problem here. Updating the expiry date of the listings to a date in the past OR future does not publish the posts anyway. Secondly - the 'package_type' in the listings was definitely set to "free" for each of the listings. Here's a screenshot of one of the listings - as you can see - the post is published, the package type is set to free and the expiry date is in the future. But these listings are still not correctly published on the site. Still - the only way to properly publish these posts is to manually edit every single one of the listings and click 'Update'. This does not work via quick edit, or by bulk-updating. So in conclusion - neither the code or the package-type explanation makes sense... Do you have any other solutions? It looks like I'm going to have to simply just take the hit and go through the listings and click update. Removing and re-importing the listings is not an option, and I'm not confident that it is the correct solution.
Hello, You are not following process suggested in the post above. You have two problems 1) listings uploaded through csv showing are showing status "Expired". 2) Your description field is not visible. Follow process given below. Go to your dashboard remove all your listings. Open your csv file. There is title field "package_type" Fill it either "free" or "paid". Save it. Then upload csv file. All your listings will show expiry date that you have set in the payment settings and your description field will also visible.
Hi Nitesh Thanks for your reply. Unfortunately - as I've said before - that is the exact process I did at the start. Therefore I am not confident that removing all 700 listings and simply re-uploading them exactly as I did in the first place will work. Never mind - I will manually edit the 700 listings individually and click Update on each one. It is not an ideal solution but it is a solution nonetheless. Thanks so much for all your help on this! Cheers Dave.
Nitesh - I have one last question if I may please. Is there a quick way/code to having "Set Address on map" within every edit listing? Currently I'm going through and editing every listing and having to click "Set address on map" on every one, so that it sets the longitude/latitude on every listing. Can I insert code anywhere to run a function that will do this in bulk for every listings so that I don't have to do it manually?