Integration widget Mondial Relay Js

You need to add this quick and dirty code in your functions.php if you’re trying to add mondial relay to checkout page : add_action(‘wp_footer’, function(){ if(is_checkout()) { ?> <!–On charge Google Map API–> <script type=”text/javascript” src=”https://maps.googleapis.com/maps/api/js?sensor=false”></script> <!–On charge le widget mondial relay depuis leurs serveurs–> <script type=”text/javascript” src=”https://widget.mondialrelay.com/parcelshop-picker/v3_0/scripts/jquery.plugin.mondialrelay.parcelshoppicker.min.js”></script> <script> $(document).ready(function () { // Charge le … Read more

Widget area for individual posts (custom post type)?

Assuming that your theme still has the_content to populate that area you can use the_content filter to populate is. Because widgets normally echo their output you would also need to buffer output. Like this: add_filter (‘the_content’,’wpse304648_widget_content’); function wpse304648_widget_content ($content) { if (get_post_type == ‘your_cpt_name’) { ob_start (); .. execute widget $content = ob_get_contents(); ob_end_clean(); } … Read more