Importing features and amenities with xpath and foreach
-
Hello,
I am trying to import a lot of features and amenities to my wpresidence wordpress site. I use WP All import and this addon. It seems as though I cannot get the following function to work properly on the features and amenities:
[FOREACH({characteristics[1]/category[name/uk = “Features”]/value)]{uk},[ENDFOREACH]
Is there something wrong in that one?
Basically,
1. the categories are always switching between different category IDs, so I have given them that xpath [name/uk = “Features”] so it finds the right values.
2. The I need to import the language uk so the path is like this: characteristics/category/value/uk
3. I need to do the foreach to get all the different values within the “Features” category.
4.It becomes trickier because I have two different categories to search through so it looks something like this:
[FOREACH({characteristics[1]/category[name/uk = “Climate Control”]/value)]{uk},[ENDFOREACH] [FOREACH({characteristics[1]/category[name/uk = “Features”]/value)]{uk},[ENDFOREACH]
Would be great if you could help me out! I have tried with only one of the categories, but that does not seem to work either. I believe it might have something to do with the comma (,) separation.
Thanks!
https://www.ads-software.com/plugins/wp-residence-add-on-for-wp-all-import/
- The topic ‘Importing features and amenities with xpath and foreach’ is closed to new replies.