2

So from the WP_Query page, I found this, which is like $args['name'] but for when you want to search for many slugs: post_name__in (array) – use post slugs. Specify posts to retrieve. (Will be available in version 4.4) I think this is maybe what you need? In that case you'd need to explode $atts['post'] on "," as you did, then pass that resulting ...


1

Not sure what you would need this for but this is how you take the data of the variable $result from the operation function to your shortcode: operation(); function operation(){ $result=5+1; return $result; } function my_function(){ $result = operation(); return (string)$result; } add_shortcode( 'my-shortcode', 'my_function' );


1

You have several options, but I would advise against what you're doing, what you really need is to make a new shortcode that calls the plugins functions to achieve what you want ( or to use a plugin that provides a filter ): 1. Search Replace on the Post Content Hook into the_content filter, and do a string search replace on the content before it's processed ...


Only top voted, non community-wiki answers of a minimum length are eligible