Plugin Author
MiKa
(@photoweblog)
Hello,
for custom post types you have to adapt your osm shortcode manually:
[osm_map_v3 map_center="52.795,23.51" zoom="3" width="95%" height="400" tagged_type="post" marker_name="wpttemp-yellow.png"]
where
tagged_type="post"
gets something like
tagged_type="your_custom_post_type"
Keep in mind, there are several strings for a cpt. The internal string/slug needs to be set for tagged_type, which is independent form the wp installation language.
Br, Mika
PS: Your site looks great!
Hello Mika
Thank you indeed I understand.
But it does not work.
The map is displayed well but without the markers of the geolocated items.
But I do not understand what you said here:
Keep in mind, there are several strings for a cpt. The internal string / slug needs to be set for tagged_type, which is independent form the wp installation language.
My very relative English and my lack of developer experience do not help me understand what you mean. If needed I can give you access to this test site.
Plugin Author
MiKa
(@photoweblog)
Hello Dom,
I do not know which way you created your custom post types. If you did it by your own within a theme you will have a code that says something like:
register_post_type( 'your_custom_post_type', $cpt_args );
Where “your_custom_post_type” is the string you have to add to the osm plugin shortcode as tagged_type=”your_custom_post_type”.
If you – for any reason – do not know the slug of your cpt and there is no documentation, I will add the feature to trace it from the WP OSM Plugin next weekend.
Br, Mika
Hello Mika,
Yes I have in my function file
register_post_type ('communautes', $ args);
and I put the OSM shortode:
[osm_map_v3 map_center = "45.7241, -49.8042" zoom = "3" width = "100%" height = "400" tagged_type = "communautes" marker_name = "wpttemp-yellow.png"]
But that does not work …
But that does not work …
For the record, I’m French, I’m currently in Poland to make a website for Canada, I think it’s fine for a mapping plugin!
-
This reply was modified 6 years, 10 months ago by
Dom Martigne.
Plugin Author
MiKa
(@photoweblog)
Hello Dom,
this looks fine.
But it seams there are no communates with geotags.
Can you set a geotag for a standard post, save it and reopen it. Then you will find a custom field called OSM_geo_data. Did you see this at the standard post.
Then go to the cpt, save a geotag and reopen it – do you also see this custom field?
Br, MiKa
Hello Mika,
Sorry to respond with decallage but I have not here a good conexion.
Yes I did the tests and created a page for you on the test site:
http://acadie.artybi.com/
For the tests
No problem to geolocate CPT articles and see custom fields.
When I created the article for you, it is well geolocated (we see it on the map) but I do not have the custom fields in the editor.
For the cpt: Everything is ok. (I did it again at the same time) …
Plugin Author
MiKa
(@photoweblog)
Hello Dom,
pls post a link to:
* the post / page with the geolocation
* the post / page with the map that should show all geolocations
Br,
MiKa
PS: If you do not see custom fields then go to [Screen Options] at the editor and enable “Custom Fields”.
Langue source : Anglais
Hello,
Sorry for so many problems …
* the post / page with the geolocation
118/5000
it (the custom fields are not displayed but the marker is displayed on the map – normal article)
http://acadie.artybi.com/for-mika-some-indications/
* the post / page with the map that should show all geolocations
http://acadie.artybi.com/
this one (custom post type – the custom fields are displayed – the widget works – but they do not display on the general map)
http://acadie.artybi.com/communautes/les-pecheurs-a-saint-pierre-et-les-acadiens-a-miquelon/
PS: If you do not see custom fields then go to [Screen Options] at the editor and enable “Custom Fields”.
Yes it’s activated
Dominique
Plugin Author
MiKa
(@photoweblog)
Hello Dominique,
I could see it, but I have no idea. I will add some additional info to the plugin to get some tracing of the custom posttypes, the categories and the tagged posts … Will provide it within the next week.
Br, MiKa
Hmm, ok thanks. For the moment I will trannsform all the articles of the custom post type in normal articles until a solution emerges!
Good week
Dominique