Sanitize AROUND shortcode

Try to use this instead: editor.focus(); var selected_text = editor.selection.getContent(); shortcode=”[checklist-box title=”” + e.data.title + ‘”]’ + selected_text + ‘[/checklist-box]’; editor.selection.setContent(shortcode); editor.setContent(editor.getContent()); Basically, I’m first forcing editor focus and then use setContent instead to change the content. In my tests there were still some glitches on the editor but the source was ok, so I … Read more

I need show posts by customer (Shortcode)

First get all data using $all_posts = get_posts( array( ‘meta_key’ => ‘user_name_key’ ,’meta_value’=>’your selected name from widget’) ); foreach($all_posts as $post ){ //add data whatever you want to display on website widget }

Hide disclaimer from summary excerpts

You could do something like this: /* Add disclaimer to top of POSTS that contain affiliate tag */ function tt_filter_the_content( $content ) { if (has_tag(‘affiliate’) && is_single()) $custom_content=”<hr><p><em>Disclosure: This post contains affiliate links and we may receive a referral fee (at no extra cost to you) if you sign up or purchase products or services … Read more

WP_Query & shortcode : Return 3 articles from a category WordPress

The problem is your $contenu variable. Try: $contenu .= ‘<div class=”effect-jazz”>’.get_the_post_thumbnail().'<div class=”jazz-try”> <div class=”h3″><a href=”‘.get_permalink().'”>’.get_the_title().'</a></div> <p>’.get_the_resume(60).'</p><!– THIS FUNCTION NEEDS TO BE CREATED –> </div> </div>’; Do not use ; trailers when using inline php, ex <a href=”‘.get_permalink().'”>. Use the appropriate return functions: get_the_post_thumbnail() get_permalink() get_the_title() Create a return version of the_resume() function Do use the … Read more