tiny_mce_before_init preventing custom shortcode icon appearing
I was able to resolve this by moving ‘infographic’ to the front of the list in the $in[‘plugins’] string
I was able to resolve this by moving ‘infographic’ to the front of the list in the $in[‘plugins’] string
You can try this: add_shortcode( ‘content’,’content_callback’ ); function content_callback( $atts, $content = NULL ){ $atts = shortcode_atts(array( ‘pid’ => ”, ), $atts); if( ! is_int( 1 * $atts[‘pid’] ) ) return “<!– Shortcode Error: pid must be an integer –>”; if( absint( $atts[‘pid’] ) === get_the_ID() ) return “<!– Shortcode Error: pid can’t be the … Read more
the_sub_field echos content. The docs are quite clear about that. The the_sub_field function is used with the repeater field and the flexible content field (license key required) to display a sub field value. When looping through one of these fields, this function displays a sub field from the current row. This is the same as … Read more
Try with this instead : wpcf7_add_shortcode(’bouton’, ‘shortcodes_in_cf7_handler’, true); function shortcodes_in_cf7_handler($atts) { //code for shortcode } You should be able to use shortcode in wpcf7 now.
The global $woocommerce can be reached, you just have to write global $woocommerce; before using it. Read this article. You can define your own shortcode, see the documentation. You can copy/paste the code because it’s wrapped in a class so it won’t trigger fatal error due to double declaration. But shortcode do not work that … Read more
$level must be passed as an integer, not as a string. The problem is with the plugin code: if (count($labels) !== $level && $labels !== ”) { echo ‘Category Chain Select Plugin</br>Error :: Number of labels don\’t match number of levels’; The !== operator requires a match on type as well as value. Had the … Read more
From Codex Shortcode Examples // In case there is opening and closing shortcode. echo do_shortcode(‘[iscorrect]’.$text_to_be_wrapped_in_shortcode.'[/iscorrect]’); Basically, you can’t use do_shortcode() two separate times for what is one shortcode consisting of a pair of tags. In your code you need to save your output to variables instead of using echo. Then at the end wrap it … Read more
@Ravs… got it with this: $title = sanitize_title($title); Thank you for your help!
WordPress offers a function called wp_localize_script. That function is your best friend for situations like yours. There are plenty of examples here. But I leave you with this good tutorial: http://pippinsplugins.com/use-wp_localize_script-it-is-awesome/
You have, at least, three wrong things in your code. First. You are “returning” before you try to update the user info, so the wp_update_user() function is not executed. Second, you have the user ID hardcoded, so you always trying to modify the nickname of the user with ID = 1 return $tableuserinf; $user_id = … Read more