How can I disable(remove) wpautop (wptexturize, convert_chars) for specific shortcodes only?
How can I disable(remove) wpautop (wptexturize, convert_chars) for specific shortcodes only?
How can I disable(remove) wpautop (wptexturize, convert_chars) for specific shortcodes only?
If the parent theme is properly coded, the following code in the child theme functions.php file should load the parent css. <?php add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ ); function my_theme_enqueue_styles() { wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ ); } ?> As for the javascript, I think that if the parent theme loads theme with wp_enqueue_scripts they should work … Read more
You should use ob_start() and ob_get_clean() for that. Also it looks like you’re not using any attributes so you can ditch the call to shortcode_atts() <?php // List judges shortcode function judges_shortcode($atts){ ob_start(); the_content(); $judges = get_posts(array( ‘numberposts’ => -1, ‘post_type’ => ‘judges’, ‘meta_key’ => ”, ‘meta_value’ => ” )); if ($judges) { ?> <div … Read more
You can try using WP Gallery Image Shortcode plugin. You will just have to add the wppgalleryimage shortcode. Then, you will have to specify the image you want to add by name or ID.
Multiple values for one variable
I found the solution. I used the following codes and it worked for me . To remove the shortcode from the content, I Used this <?php $content = get_the_content(); $content = preg_replace(“/\[.*]/m”, ” “, $content); $content = apply_filters(‘the_content’, $content); $content = str_replace(‘]]>’, ‘]]>’, $content); echo $content; ?> and the following code to get the shortcode … Read more
Shortcode generated widget to appear on same line as heading text and button
After some discussing in the comments, I can surmise that this is your situation: You have functionality for processing a user registration in some way when a form is submitted. You need a way in the CMS to specify which forms this processing needs to happen for. What it looks like you’re attempting to do … Read more
This looks like javascript. do_shortcode is a php function. I’m not sure the full context, but at the very least, you need to wrap your php function in php tags like this and add an echo: <?php // Start of php file ?> <script> var stockcounter = document.getElementsByClassName(“stock in-stock”); if(stockcounter[0].innerHTML==’0 in stock’) { //Displays timer … Read more
OK, so the code is wrong, because there are a lot of errors in it: Shortcodes should return its results and they shouldn’t print anything. Shortcode callback takes an array of attributes as first param and not an ID. You don’t do anything with the parameter of your shortcode callback. You don’t pass any ID … Read more