How to allow shortcodes in image descriptions?
Could you please try to use the wp_get_attachment_caption hook, this will helps you in enabling shortcode for Image caption field. add_filter( ‘wp_get_attachment_caption’, ‘do_shortcode’ );
Could you please try to use the wp_get_attachment_caption hook, this will helps you in enabling shortcode for Image caption field. add_filter( ‘wp_get_attachment_caption’, ‘do_shortcode’ );
you can generate shortcodes and launch them with this function : https://developer.wordpress.org/reference/functions/do_shortcode/ so you can do that in your plugin : add_shortcode(“MY_PLUGIN__forms_with_dates”, function ($atts, $content, $tag) { $atts = shortcode_atts([ “months” => 11, “id_form” => NULL, ], $atts, $tag); if (!isset($atts[“id_form”])) { return “shortcode $tag : the argument id_form is missing.”; } $shortcodes = “”; … Read more
Page Builders that leave code behind are a real pain. I am assuming it left shortcodes behind, which is typical. I don’t have a fast and easy solution for you, but I do have one. You can do this before or after the import. I usually do it after so I’m not wasting time fixing … Read more
Okay… so this code actually works. The issue was you cannot resend an woo-commerce email that is not generated yet. And woo-commerce emails are generated only when status is changed.
Can I add two wordpress shortcode plugins in the same site (not the same page)?
I worked around my problem by minifying my html in my plugin. So I made a function called wl_minify_html(String $htmlString) (which I found some another stack overflow answer somewhere). So here’s what my plugin looks like now: <?php function wl_minify_html($htmlString) { $search = array( ‘/\>(\s)+\</s’, // strip white space between tags ‘/\>[^\S ]+/s’, // strip … Read more
Custom Plugin not Displaying in the Website Production environment (Divi)
I found “Subpage Lister” and it solved the problem. If there are others that use the exact same [subpages] code, then I would like to know. https://wordpress.com/plugins/subpage-view Now, I need to find one that supports the [previous_page] [next_page] shortcodes. It’s possible I wrote custom shortcodes and lost the code or forgot how to do them. … Read more
Use the parameters of the shortcode with lowercase: [recurring_event short=”Wed” full=”wednesday”] Try to follow the next code: // NAV: Custom Code function wpcoder_recurring_event_att( $atts ){ $date=””; $default = array( ‘short’ => ‘Sun’, ‘full’ => ‘sunday’ ); $eventday = shortcode_atts($default, $atts); date_default_timezone_set(‘US/Eastern’); if(date(‘D’) == $eventday[“short”]) { echo date(‘F d, Y’); } else { // Create a … Read more
Scenario: Gutenberg Blocks -> page.html has wp: include that includes a pattern file that has shortcode in it, the shortcode is not executed and comes back text only. After reviewing and testing the above issue I realized the shorcode just does not run, I did find a workaround that allows the shortcode to run as … Read more