How to strip html from Shortcode

This topic contains 7 replies, has 4 voices, and was last updated by  Alex Rollin 6 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #459632

    Ansen Sligar
    Expired Member
    Post count: 13

    How do I strip all html from the shortcode?
    I have tried [gd_post_meta key=”test” show=”value-strip”] but it still outputs the following html code:

    <div class=”geodir-post-meta-container”>
    <div class=”geodir_post_meta geodir-field-test”>
    <p>[email protected]</p>
    </div>
    </div>

    I would like to just get the email address with out any formatting.

    Thanks

    #459709

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    I flagged your request for the developers. The strip-tag parameter doesn’t appear to working correctly.

    Thank you

    #459790

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Ansen,

    The value-strip is used for stripping tags from the value of the field, like for post_content to return just test and no html in the value.

    How exactly are you trying to use this, it may be that we need to add a “raw” option that also suppresses wrappers, but there might be a better way if you let me know how you are using it?

    Thanks,

    Stiofan

    #459812

    Ansen Sligar
    Expired Member
    Post count: 13
    This reply has been marked as private.
    #459937

    Alex Rollin
    Moderator
    Post count: 27815

    The developers are considering how best to go about this, and a task has been created to look at how to implement it. Until that happens this is a customization that can only be achieved with custom code. We will make an update here as soon as we have one.

    #459988

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Ansen,

    While we consider adding a raw option i believe you can achieve what you want by using the Elementor post meta feature, you can access any post meta value by prefixing the key with “geodir_” so in this case “geodir_email”

    Thanks,

    Stiofan

    #460015

    Ansen Sligar
    Expired Member
    Post count: 13
    This reply has been marked as private.
    #460050

    Alex Rollin
    Moderator
    Post count: 27815

    In that particular Elementor widget it would appear you do not have the option for making a custom connection to post custom fields except those that are already declared. That is a potential integration that we will look at for future versions.

    For now you would need to create a customization to make a custom function to retrieve the value and another to make it available to that Elementor widget.

    We do not offer that level of integration with builders at this time, but we are looking at it for a future addon.

    I will flag your question for the developers in case they are aware of a workaround.

Viewing 8 posts - 1 through 8 (of 8 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount