Using OSM with custom post types

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #64939 Reply
    john
    Guest

    Hi, I think this plug-in looks great and have just installed it, however I need it to work with custom post types. I can’t figure out how to do this, as I can only see it working with standard Posts. Is there a way I can change this?

    Thanks in advance for any assistance

    #64955 Reply
    – MiKa –
    Keymaster

    Hi john,

    since several user asked for it, we will bring it in July.

    Br, MiKa

    #65704 Reply
    – MiKa –
    Keymaster

    ooops – somewho this got out of focus … is not implemented yet, we will bring it on the list.

    #65703 Reply
    Hans
    Guest

    Hello.
    Have you add the custom type compatibility to the pluggin? I’m looking for this in configuration and in docs, but i can’t find it.

    Regards

    #65712 Reply
    Hans
    Guest

    😉
    Thanks

    #65788 Reply
    – MiKa –
    Keymaster

    Hello Hans, hello John,

    let us know if it works with the latest version.

    Thanks & br,
    MiKa

    #67619 Reply
    deedeedeedeedee
    Guest

    Hi,
    gibt es zu dem Thema Neuigkeiten? Ich habe auch einen custom post type in meinem Projekt und würde entsprechende Posts gerne auf einer Karte anzeigen lassen. Wenn ich meinen custom post type in das Feld “tagged_type” eintrage, werden entsprechende Posts mit Geotags leider nicht angezeigt (es erscheint schlicht die Karte ohne jegliche Pins).

    #67629 Reply
    – MiKa –
    Keymaster

    Hello deee …

    create a new post, place only the following shortcode:

    [osm_info]

    and post the result here.

    Br, MiKa

    #67693 Reply
    deedeedeedeedee
    Guest

    Hey guys,
    I made it work by editing the code of the plugin.
    In the plugin’s subfolder “osm_map_v3” you’ll find the file “osm-sc-osm_map_v3.php”. This file is used to display the map. There are two lines, where the post_types are checked for, and there you will need to add your own post_type:

    Line 381:
    if ((($tagged_type == “post”) || ($tagged_type == “page”) || ($tagged_type == “arofto_questions”)) && ($tagged_param == “cluster”)){

    Line 471:
    if ((($tagged_type == “post”) || ($tagged_type == “page”) || ($tagged_type == “arofto_questions”)) && ($tagged_param != “cluster”)){

    I added my own post_type “arofto_questions” as you can see. Actually, I replaced the check for “any” since that didn’t work anyways. But you could leave that and just add your own custom post_type(s).

    Also, don’t forget that the plugin doesn’t show private posts on the map!

    Hope this helps.

    #67747 Reply
    – MiKa –
    Keymaster

    Hello dee…

    thanks a lot for sharing your solution here!

    You are right, it looks like “any” was not considered or is not considered anymore. So I changed the handling.

    If you make changes by your own, you have to consider, that an update of the plugin deletes your modifications.

    With V5.4.2 custom post types should work – let us know.

    Br, MiKa

    BTW: There is no way to donate for the osm plugin but we are looking forward your rate here: https://wordpress.org/support/plugin/osm/reviews/
    Thanks!

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Using OSM with custom post types
Your information:




+ 66 = 71



By continuing to use the site, you agree to the use of cookies and load data from third parties. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close