Display multiple CPT on a map ? FacetWP Map Facet

Support MB Custom Post Type Display multiple CPT on a map ? FacetWP Map FacetResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30409
    tripvendortripvendor
    Participant

    Hi - I 'm just starting to plan out what to do, so would appreciate some guidance regarding Business Directory site

    I read your article about displaying on maps.
    I read your blog post about database optimization and structuring tables to scale better (good, thanks).

    I'm not sure what the total listing count will be but it will run into tens of thousands eventually.

    1) does it make sense to separate the listings into different CPT to maintain performance for users searching on keywords (government listings in one CPT, healthcare in another, businesses or points of interest in another?

    2) if there are separate different CPT can they be displayed on the same map using some kind of location parameter?

    3) is Meta Box compatible with FacetWP Map Facet - and would this be the way to go to manage map displays?

    thanks

    #30428
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thank you for getting in touch. Let me answer your questions.

    1. All CPTs are stored in one table (wp_posts) so I think it does not improve the performance when separating the listings into many CPTs. Just helps you to categorize the type of content.
    2. Yes, it is possible to query multiple post types.
    3.         $query = new WP_Query( [
                  'post_type' => array( 'government', 'healthcare' ),
              ] );

      Read more on the documentation https://developer.wordpress.org/reference/classes/wp_query/#post-type-parameters

    4. Unfortunately, FacetWP can't filter by maps. You should make it filter by other fields (cities, wards, etc.), and the map will be displayed accordingly.
    #30433
    tripvendortripvendor
    Participant

    great support thanks.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.