I got this code: <?php echo basename(get_permalink()); ?>
and I get slug of current post page example: "dog-training"
And my wordpress posts are like this:
domain.com/dog-training/
domain.com/dog-toys/
domain.com/dog-food/
etc.
And I need to get the slug but only the part "toys", "food" and "training" so I need to get rid of the "dog-" part.
Will You help me with this. I`m not a programmer ?
Thanks