• 0
    down vote
    favorite
    I’m running a PHP script that pulls property listing data from a RETS server and inserts the listing date into the WordPress database directly with SQL queries. I’m not using any WordPress functions for this as i’m not very familiar with them and speed is very important to keep up with all the data.

    I have a custom post type called listings with a custom category/taxonomy called locations.

    The script creates the custom spots, creates and assigns taxonomies for locations. Examples of terms for ‘locations’ could be city names ‘Miami’,’Aventura’, zip codes and the names of buildings.

    When I go to to edit one of the ‘listings’ I can see that it shows the correct taxonomies selected.

    However when trying to view the list of ‘listings’ on a specific location/category, no listings/posts show and i get an error from my theme:

    Notice: Trying to get property of non-object in /path/wp-content/themes/Avada/includes/class-fusion-breadcrumbs.php on line 437
    This error shows twice and then:

    Catchable fatal error: Object of class WP_Error could not be converted to string in path/wp-content/themes/Avada/includes/class-fusion-breadcrumbs.php on line 618
    This is fixed by editing the custom location taxonomy from WP admin and just hitting Update, then the errors go away and the listings/posts are displayed.

    However i have over 4500 locations and will add more in the future. I can’t seem to find any changes done to the database from before/after I hit Update on the custom location.

    Through +5 hours or reading it seems as WP has a global variable called $wp_taxonomies, but like I said I’m running a script from outside of WordPress to interact with it’s database.

    How would I register these taxonomies completely or is there a way to ‘mass’ Update all the current taxonomies for ‘locations’?

Viewing 1 replies (of 1 total)
  • Hmm. Have you tried posting this on the Avada Theme forums?

    What happens when you use a different theme to view the listings? Do you still see error messages?

Viewing 1 replies (of 1 total)
  • The topic ‘Registering and assigning Custom Taxonomies directly through SQL’ is closed to new replies.