Then I would like to get the smallest child Category of a post that belongs lots of categories (via the datalayer pageCategory used plugin called GTM4WP by Duracell Tomi).
How can I do that?
- I had already known to get the biggest category: pageCategory.1
- Already tried pageCategory.10 or pageCategory.length-1 but didn't work. I'm not really familiar with Javascript. Please guide me