How to strip header tags & shortcodes from the_excerpt()

Remove Shortcodes First, try this on your functions.php: add_filter( ‘get_the_excerpt’, ‘strip_shortcodes’, 20 ); If it doesn’t work then try this edit. echo strip_shortcodes( get_the_excerpt() ); In case the shortcode is not registered with WordPress function add_shortcode add_filter( ‘the_excerpt’, ‘remove_shortcodes_in_excerpt’, 20 ); function remove_shortcodes_in_excerpt( $content){ $content = strip_shortcodes($content); $tagnames = array(‘box’, ‘alert’); // add shortcode tag … Read more

Function in a wordpress shortcode

I don’t think you want the display name – it may not be unique. Try using the log-in name instead. The user name for the displayed profile: $myhope = bp_get_displayed_user_username(); The user name for the current user: $current_user = wp_get_current_user(); $myhope = $current_user->user_login;

Convert WordPress shortcodes into plain html

First of all, you have a syntax error. If your shortcode is stored in the $output variable, you would need to call echo do_schortcode($output);. But, wouldn’t simply the_content(); do the trick? I believe the shortcodes would be processed if you do this. You can make a new query with WP_Query, and then use the_content() in … Read more

Remove a short code and update it’s content (AJAX)

Is your $_Post returning the array as expected? From what I’m seeing your add_action isn’t calling the right function either… Either change wpprolister_ajax_layoutcontrol in that line to ajax_layoutcontrol or rename the function to wpprolister_ajax_layoutcontrol Another option may be to put a selectbox meta on the page and use that to call the correct format though. … Read more