get slug from given id
-
I’m trying to pass a taxonomy slug to a loop. I have a custom field that sends an ID of 6. I want to ‘get the slug’ for this and feed it to the query (they like slugs)
$slid = get_field('slideset_slug');//advanced custom fields plugin $term = get_term($slid, 'slide-set'); $slug = $term->slug; $slideLoop = new WP_Query( array( 'post_type' => 'slide', 'posts_per_page' => 10, 'slide-set' => $slug
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘get slug from given id’ is closed to new replies.