import cpt file

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

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

Open Support Ticket
  • Author
    Posts
  • #51311

    Steve
    Full Member
    Post count: 1019

    I am attempting to import my CPT data. For starters I used the “Place” Dummy Data and exported / downloaded the file.

    1. I will use this as a template for naming the headers on my contractor spread sheet. This means I will need to insert more columns correct? (as my spread sheet does not have that many columns)

    2. I do not have images to import so would I need to create the image columns? I do not mind doing so but if not needed then it will save me the time.

    3. Regarding the GD documentation, “2. When adding a listing in a subcategory, you should also add the main category. Separate the category names with a comma. So, since I am dealing with 100% Contractors on this import do I have to, in the category field as an example put, “Contractor, General Engineer, Contractor Building Contractor…? If, yes, I have thousands of lines of Contractors to import. Is there some way to add the “Contractor,” in front of the Subcategory without having to do it manually line by line?

    4. Column “post_author” will that be the number one for me as administrator?

    Currently my Columns are: (file size 100kb)

    business_name
    contacts_name
    license_number
    primary_license_type
    affililations
    dunns
    street_address_po_box
    city
    state
    county (this can be deleted? yes? )
    (not country column. this can be added)
    continent
    link_to_verify_license (this can be deleted too)
    linked_in (this to can be deleted)
    naic_sic_codes

    5. When saving spread sheet “save as” .ods?

    6. Do I create the “post_id” column and just leave blank upon import?

    Thank you. Kind regards

    #51359

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    1) yes you need to add column for any custom field, but you must create the custom fields fisrt. In the documentation this is explained here: https://wpgeodirectory.com/docs/core-place-settings/ You will use the html variable with geodir_ in front, as new heading for the column. If your custom field html variable is petfriendly the column name will be geodir_petfriendly.

    2) Not being a mandatory field, if you have no images you can leave that columns empty https://wpgeodirectory.com/docs/core-export/#mandatory

    3) as far as I know, No there isn’t. In any case we don’t provide support for open office or other CSV editors. There are dedicated support forum where you can ask that question.

    4) The column of the original CSV cannot be changed (name or positions) you can only add your custom fields at the far right of the sheet.

    5) Save as CSV

    6) If you are adding new listings, post_id must be blank. You put the IDs only if import is for updating existing listings.

    Hope this helps.

    Thank you

    #51366

    Steve
    Full Member
    Post count: 1019

    Thank you again.
    Regarding the Column of the original CSV cannot be changed (name or positions) What is that exactly.
    Asking… How does it relate “column position wise” to the “Contractor Setting” list of fields?

    IN the Contractor Settings the order is:
    Field: Contractor (taxonomy)
    Field: Business Name (test)
    Field: Contact’s Name (text)
    Field: Office Phone: (phone)
    Field: Mobile Phone: (phone)
    Field: Fax (phone)
    Field: License number (text)
    Field: NAICS-SIC (text)
    Field: Affiliations: (text)
    Field: DUNNS: (text)
    Field: Webiste: (url)
    Field: Address: (address)
    Field: Time: (text)
    Field: Email: (email)
    Field: Twitter: (url)
    Field: Facebook (url)
    Field: Video (textarea)
    Field: Special Offers (textarea)

    How do the Columns position in relation to the #4 “The Column of the original CSV cannot be changed (name or postions) you can only add your custom fields at the far right”

    Visually, that would mean that all my custom fields with the red “X” would be after the mandatory field but is there a list of the mandatory order?

    Kind regards, much appreciated

    #51367

    Paolo
    Site Admin
    Post count: 31206

    is there a list of the mandatory order?

    Don’t change anything present in the sample CSV and add the new fields after the last column.

    Let us know,

    Thanks

    #51368

    Steve
    Full Member
    Post count: 1019

    Ok. So after all of your existing columns I will begin for example geodir_business_name, geodir_contacts_name, and on and on “after” all existing fields. If yes, then I got it. All the custom fields.

    #51370

    Paolo
    Site Admin
    Post count: 31206

    That is correct.

    Thank you

    #51387

    Steve
    Full Member
    Post count: 1019

    Something just does not click.
    “post_category: use the name of the category or the slug; this category has to be created in WP admin before you import!
    post_type: for example gd_place or gd_event; this CPT has to be created in WP admin before you import!”

    I have the Category “Contractor” in post type on wp categories

    The CPT is “Contractor”

    The subcategories are numberous. I have not added the subcategories to the CPT. Do I need to do this first?

    The rows are 217,000

    I some how feel that I am going to get a Contractor, contractor, subcategory type of contractor.

    I am almost ready to complete the process.

    #51468

    Paolo
    Site Admin
    Post count: 31206

    Yes, categories must be created in advance. You can bulk import them too.

    Thank you

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
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount