Plugin Author
hupe13
(@hupe13)
I tested all variants (category name, slug, ID) again, my examples work as expected. Are you using any plugin for categories?
I use an addin to add categories and tags to Pages. I’ve also tested with my Posts too.
https://en-gb.ww.wp.xz.cn/plugins/pages-with-category-and-tag/
Plugin Author
hupe13
(@hupe13)
It works with this plugin too, I tested it.
If you call the category page, all pages and posts in this category appear? Does every of these pages / posts have a custom field for latlngs?
I’ve been doing a lot of testing to try to get to the bottom of this. I think the problem is my use of Polylang for multiple language versions of my pages. I have two categories, one for each language. On a map I am showing the markers for the appropriate language by specifying the category for each language in each of the two versions of the page. This is not working – it picks up both language pages. Although there are two categories – the fact they are linked as different languages for the same category means your code gets confused.
To work around I’ve added two dummy categories and don’t link them for language. I can then select the pages I need.
It would help if your code worked with polylang. I think it will be a common use case to show just markers for the right language.
Thanks for your testing efforts too.
Actually – that workaround doesnt work reliably. I can’t control which language version of the page is used as a marker – even using different categories.
My new workaround (appears to work) is to have two sets of lat lng in differently named custom fields for the two different language pages. I then set latngs= to the language group I want. Bit of a cludge but it works.
So not sure if you want to support use of polylang …… would be helpful … but there is a workaround.
Plugin Author
hupe13
(@hupe13)
I will take a look at it.
Plugin Author
hupe13
(@hupe13)
No. That would be good if you did :-). Hard to see a pattern to what appears … sometimes one language, then another, then all.
Plugin Author
hupe13
(@hupe13)
Do all pages / post have the same name of custom field for latlngs, independently from language?
-
This reply was modified 2 years, 1 month ago by
hupe13.
When I was trying to get your filter to work then all pages had the same named latlng custom fields. over all languages.
To get it to work I’ve now split each language so all in english have one latlng name and the other has a different one. That way I can select the pages for a language group.
Plugin Author
hupe13
(@hupe13)
Thank you very much. Now I know the reason, I will fix it.
-
This reply was modified 2 years, 1 month ago by
hupe13.
Thanks. Look foreword to seeing the latest batch of fixes in the WordPress addin. Thanks.
Plugin Author
hupe13
(@hupe13)
To get it to work I’ve now split each language so all in english have one latlng name and the other has a different one.
As I understand Polylang’s logic, this is the right way. You also have different categories for the different languages.
In addition, there is a new option in the backened for overviewmap to deactivate caching (transients) now, if it does not work.