Auto embeds don’t work for attachment descriptions
Auto embeds don’t work for attachment descriptions
Auto embeds don’t work for attachment descriptions
do a print_r to your $a variable, there you see everything that is happening echo ‘<pre>’; print_r($a); echo ‘</pre>’; die(); this way you can see if the url variable has double quotes, because it seems it doesnt have.
I haven’t tested this, but you could try this: Put this php in your functions.php. function rt_connections_id () { if ( is_user_logged_in() ) { $usersid = get_current_user_id(); $newout = do_shortcode(‘ [connections id=’.$usersid.’] ‘); } else { $newout=””; } return $newout; } add_shortcode(‘current-user-connections’, ‘rt_connections_id’); Now call it into action by using the shortcode [current-user-connections] INSTEAD of … Read more
Show content if user left comment / non-logged visitors?
Shortcode attributes should be all lowercase A Note on Security There are 2 major security issues in your shortcode: extract is dangerous as it can overwrite variables, it would be much safer to use $ID = ! empty( $atts[‘ID’] ) ? $atts[‘ID’] : null; instead. You might see this in a lot of examples but … Read more
Adding shortcode of “Random Content” Plugin in the post after the title
Can’t render shortcode when html tag contains hyphen
How can i strip shortcode from HTML title tag?
How to add site tags in alphabetical order to shortcode?
One option is to register your own shortcode to act as a wrapper for the plugin’s shortcode. In the wrapper callback you would then retrieve the current user’s ID and pass it to the actual shortcode. Simplified example, add_shortcode( ‘my_user_profile_avatar’, ‘my_user_profile_avatar_callback’ ); function my_user_profile_avatar_callback( $atts, $content = null ) { // (int) The current user’s … Read more