WordPress.org

Ready to get started?Download WordPress

Forums

Comprehensive Google Map Plugin
Custom Post type not adding marker to Geo Mashup (3 posts)

  1. digitalrenewal
    Member
    Posted 1 year ago #

    Not sure Im doing this right...
    I created a custom post type to add local listings.
    Under settings, entered my custom post type.

    Custom post type works, map builder shows up in editor, saves fine.

    BUT!!! The markers are not added to the geo mashup on the home page, which is kinda the main nav system on the site...

    site is here: http://historicdepot.com/
    what am i doing wrong? any insights?

    Thanks!
    Trisha

    http://wordpress.org/extend/plugins/comprehensive-google-map-plugin/

  2. jrosenthal
    Member
    Posted 1 year ago #

    Trisha - I just ran into the same issue as I am working with Custom Post Types. I think the question is how do you have the mashup map look at a particular post type for its data. The regular post seem to work fine.

    Did you find anything out on this? BTW - Very nice website!! Kudos

    Jeff

  3. luizamcf
    Member
    Posted 1 year ago #

    Hi! I'm having the same problem.
    I noticed that on the functions.php file on lines 712 to 720 there are two variables that call for content form the post_type column:

    if ( !function_exists('cgmp_extract_markers_from_published_content') ):
    
    		function cgmp_extract_markers_from_published_content()  {
    
    			$posts = cgmp_get_content_from_db_by_type("post", CGMP_DB_PUBLISHED_POST_IDS);
    			$pages = cgmp_get_content_from_db_by_type("page", CGMP_DB_PUBLISHED_PAGE_IDS);
    			return array_merge(process_collection_of_contents($posts), process_collection_of_contents($pages));
            }
    endif;

    I am not much of a coder but I tried adding the name of my custom post like so:

    if ( !function_exists('cgmp_extract_markers_from_published_content') ):
    
    		function cgmp_extract_markers_from_published_content()  {
    
    			$posts = cgmp_get_content_from_db_by_type("post", CGMP_DB_PUBLISHED_POST_IDS);
    			$pages = cgmp_get_content_from_db_by_type("page", CGMP_DB_PUBLISHED_PAGE_IDS);
    			$custom_post = cgmp_get_content_from_db_by_type("custom-post", CGMP_DB_PUBLISHED_CUSTOMPOST_IDS);
    			return array_merge(process_collection_of_contents($posts), process_collection_of_contents($pages), process_collection_of_contents($custom_post));
            }
    endif;

    But it still didn't work. I will keep following this topic for more information on how to make it work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic