• Resolved quinox

    (@quinox)


    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

    • This topic was modified 3 years, 8 months ago by quinox.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author berkux

    (@berkux)

    Hi Roland,

    <<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.>>
    Well, the WYSIWYG editor modifies the code in it’s own way…

    I seen no way (beside the do_shortcode you tried but can’t use) here with the free version: Can you stay at the text editor?

    This situaiton is the reason why the pro plugin’s shortcode stores the template-code in an external way (but there is no WYSIWYG).

    Bernhard

    Thread Starter quinox

    (@quinox)

    Hi Berkux,

    Thanks for your response.

    No, the customer is able to edit the page themselves, so that’s not an option.

    Do I understand correctly, If I use the pro-version of the plugin, the problem will be solved?

    Roland

    Plugin Author berkux

    (@berkux)

    Hi,

    questions about the pro plugin only at
    https://jsoncontentimporter.freshdesk.com/widgets/feedback_widget/new?searchArea=no
    please

    Bernhard

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode inside importer shortcode’ is closed to new replies.