How to add button to WYSIWYG to insert shortcode with params (filled in system popup)?
How to add button to WYSIWYG to insert shortcode with params (filled in system popup)?
How to add button to WYSIWYG to insert shortcode with params (filled in system popup)?
Solved by wrapping everything in document.addEventListener(“DOMContentLoaded”, function() {} Realized it was trying to fire the script off document.addEventListener(“DOMContentLoaded”, function () { var getSiblings = function (elem) { // Setup siblings array and get the parent var siblings = []; var sibling = elem.parentNode.parentNode; // Loop through each sibling and push to the array while (sibling) … Read more
Product description is mixed in shortcodes
This is happening because in the function the first parameter is named $content and you use it as HTML content: function add_social_share_buttons($content) { …. // Append the share buttons HTML to the content $content .= $share_buttons; return $content; } But the first parameter of a shortcode callback is not a string of content, it’s an … Read more
Add Shortcode functionality to a function that queries custom post type / taxonomy
Shortcode to return data instead of outputting HTML?
How can I remove the wp_autop filter from a shortcode block in a block theme page template (twenty twenty-three)?
Woocomerce custom add to cart button edit functionality [closed]
If you have a strict list of allowed years: $allowed_years = array(‘2018’, ‘2019’, ‘2020’, ‘2021’, ‘2022’, ‘2023’, ‘2024’); Then why are you using regex when you can search for those years directly: function vyperlook_get_years_in_text( string $text, array $allowed_years ) : array { $found_years = []; // the years we found // for each year that … Read more
SOLUTION: I looked through Divi’s functions.php & saw that the term for the project tags is ‘project_tag’, so when I amended my $query args it now works! Thank you very much to everyone who responded 🙂 $query_args = array( ‘post_type’ => ‘project’, ‘post_status’ => ‘publish’, ‘order’ => ‘DESC’, ‘orderby’ => ‘date’, ‘posts_per_page’ => ‘3’, ‘project_tag’ … Read more