New shortcode search by id, slug, or name?
-
I am writing a new plugin and am having a heck of a time with the short code portion.
I have it successfully pulling from the custom category ID but can’t get it to do names or slugs as well.
[shortcode id=”1,2,3″] -> Works!
[shortcode id=”slug-name”] -> Loads All posts
[shortcode id=”name” -> Loads all posts
My only other thought would be to split it into different sections; “id, slug, and name”.
[shortcode id=”1,2,3″ slug=”slug-name” name=”name”]
Would this be the best route to take or am I making this whole thing way more complicated than it needs to be.
- The topic ‘New shortcode search by id, slug, or name?’ is closed to new replies.