In this example, we will show you how you can exploit smart_seo_import_update
to easily create posts/pages in one go via CSV import. First off, let’s prepare our CSV.
Here, we will create a post with location as post type with the following custom fields:
- address
- suburb
- coordinates
- phone
Your CSV may look like this:
post_id | post_type | post_title | address | suburb | coordinates | phone |
0 | location | BP Beeliar | 701 Beeliar Dr, Cockburn Central WA 6164 | Cockburn Central | -32.1273058,115.8412204 | (08) 1234 5678 |
0 | location | IGA Kinross | Kinross Central Shopping Centre Cnr Selkirk Ave &, Connolly Dr, Kinross WA 6028, Australia | Kinross | -31.7183214,115.7393733 | +61893049748 |
0 | location | Malibu Fresh Essentials | Unit 9 Malibu Rd, Safety Bay WA 6169, Australia | Safety Bay | -32.303732,115.7421268 | (08) 1234 5678 |
0 | location | IGA Kingsley | 100 Kingsley Dr, Kingsley WA 6026, Australia | Kingsley | -31.8079966,115.7876127 | +61894097088 |
Add below’s code in your theme’s functions.php file: