Shortcode inside importer shortcode
-
Hi,
I’m using the JSON importer plugin for a project. This is all working fine but I do have one issue with it.
I’m using the shortcode [jsoncontentimporter url=https://…….] to show reviews via our custom NPS system. Inside the jsoncontentimporter I do have HTML codes as well. See here for an example:
[jsoncontentimporter url=https://xxx.nl/api/NPS/GetTestimonials?AlleenParticulier=true&take=4] <div class="row"> <div class="col-md-12"> <div class="beoordeling"> <div class="row"> <div class="col-md-2"> <div class="score-testimonial-wrapper"> <div class="score"> {Score} </div> <div class="stars-wrapper"><span class="stars" data-rating="{Stars}" data-num-stars="5" ></span></div> </div> </div> <div class="col-md-10"> <div class="content-wrapper"> <div class="naam"> {Naam} <em>{plaats}</em> </div> <div class="tekst"> {tekst} </div> </div> </div> </div> </div> </div> </div> [/jsoncontentimporter]
I’ve put this code in a WYSIWYG editor. This is working fine until I switch form text-mode to visual mode in de WYSIWYG editor and save the page. Then the code ‘<span class=”stars” data-rating=”{Stars}” data-num-stars=”5″ ></span>’ dissapears. This code is needed to show the amount of stars from the review.
When I put this code in a <?php echo do_shortcode….. it all goed well, but can’t use it here on this particular page. So I thought….using shortcode.
But the combination with the jsoncontentimporter shortcode and another shortcode doesn’t work in a WYSIWYG editor.Also putting the whole code in a shortcode does not work. The jsoncontentimporter does nothing.
Is it possible to put the jsoncontentimporter in a custom shortcode?
If you need more info like screenshots or something else, please let me know.
Regards,
Roland
- The topic ‘Shortcode inside importer shortcode’ is closed to new replies.