Different ID in every shortcode

What if you concatenate the string, like $author_ig = ‘[instagram-feed id=”‘ . get_the_author_meta(‘instagram’) . ‘” imageres=”full” showheader=”true” showbutton=”true” buttoncolor=”#fff” buttontextcolor=”#000″ showfollow=”false”]’; echo do_shortcode($author_ig); I used get_the_author_meta instead of the_author_meta, because the former returns the meta as a string while the latter echo’s the meta.

Multiple instances of the shortcode on the same page

I’d expect that the final return do_shortcode($return); is the problem as it tries to process a shortcode named the entire content you are about to return and return a value. I expect that this is not what you are intending there. Try changing that to: return $return; If that does not fix things, then I’d … Read more

WordPress Short code for List style

I finally make it ready after some more research. function coregnie_list_ul( $atts, $content = null ) { extract(shortcode_atts(array( ‘style’ => ‘cg_list’, ), $atts)); return ‘<ul class=cg_list_’.$style.’ >’.do_shortcode($content).'</ul>’; } add_shortcode(‘ul’, ‘coregnie_list_ul’); function coregnie_list_li( $atts, $content = null ) { return ‘<li>’.do_shortcode($content).'</li>’; } add_shortcode(‘li’, ‘coregnie_list_li’);

find shortcode inside content of post

In order to get your shortcode to show up, you have to register it first. This is done with add_shortcode(). You can read more about the Shortcode API in the Codex. Here is an example of a Youtube video-shortcode that accepts 3 parameters; Video ID (from Youtube, the last part of the Youtube url), height … Read more

Shortcode to return an image based on post taxonomy

There’s no need to replicate The Loop in your plugin; WordPress is working within a post when it processes a shortcode, so the post ID is available when the shortcode is being processed. Also, your arguments for has_term are out of order. And finally, it’s a best practice to make a shortcode all one word. … Read more

WordPress upgrade adding additional quote marks to shortcode output

This is probably the result of the wordpress 4.0.1 security fix which changed how shortcodes are handled http://wptavern.com/wordpress-4-0-1-exposes-bad-development-practices-used-in-some-plugins. While I am not sure about the details your shortcode handling seems to match the general description of trying to parse the shortcode by yourself instead of properly registering it. To fix this you need to create, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)