parent and child categories
-
I imported posts with parent and child categories and the import is correct but on the parent and child categories were sometimes stored in the wrong order in the array, even though under the categories they are selected correctly.
So when I run the functions
function post_url_shortcode() {
$categories = get_the_category(); if ( ! empty( $categories ) ) {
echo ” . $categories[1]->slug’I get the wrong result for $categories[1].
https://snipboard.io/LmVnkE.jpg
https://snipboard.io/vGdpMD.jpg
How do I fix it.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.