Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • seds

    I use this plugin to create prototype for CF7 form, to allow web site administrator to update prototype if he needs, without access to template child code source.

    I tried something like that to use worpdress internalization, but it failed:

    <div class='prototype bg-light border p-2 mb-3' data-item='' data-price='' data-all=''>
        <div class='row'>
            <div class='col-12 item-data'>
                <label class='item-label'><span></span> :</label><br>
                <input type='hidden' name='item[__id__][name]' value=''><br>
                <input type='hidden' name='item[__id__][price]' value=''>
            <div class='col-12'>
                <label><?php _e( "Reason", "storefront-child" ); ?> <abbr class="required">*</abbr></label>
            <div class='col-6'>
                <select name='return-object__id__' class='return-object'>
                    <option value='<?php _e( "Exchange", "storefront-child" ); ?>'>
                        <?php _e( "Exchange", "storefront-child" ); ?></option>
                    <option value='<?php _e( "Refund", "storefront-child" ); ?>'>
                        <?php _e( "Refund", "storefront-child" ); ?></option>

    Then retuns:

    <div class="prototype bg-light border p-2 mb-3" data-item="" data-price="" data-all="">
        <div class="row">
            <div class="col-12 item-data">
                <label class="item-label"><span></span> :</label><br>
                <input type="hidden" name="item[__id__][name]" value=""><br>
                <input type="hidden" name="item[__id__][price]" value="">
            <div class="col-12">
                <label><!--?php _e( "Reason", "storefront-child" ); ?--> <abbr class="required">*</abbr></label>
            <div class="col-6">
                <select name="return-object__id__" class="return-object">
                    <option value="<?php _e( &quot;Exchange&quot;, &quot;storefront-child&quot; ); ?>">
                        <!--?php _e( "Exchange", "storefront-child" ); ?--></option>
                    <option value="<?php _e( &quot;Refund&quot;, &quot;storefront-child&quot; ); ?>">
                        <!--?php _e( "Refund", "storefront-child" ); ?--></option>

    Do you have any solution?

    Hi @seds,

    With Shortcoder plugin, we can create shortcodes for HTML/CSS/JS.

    Here you are using PHP code which the plugin will not execute.
    You might have to use “code snippets” to use PHP code.

    Please let me know if I misunderstood your query.



    Thank you I will remember
    But I opt to create the shortcode with an add_shortcode(), the .mo lang being already in place

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter