This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Our next available supporter will start replying to tickets in about 0.19 hours from now. Thank you for your understanding.

This topic contains 4 replies, has 2 voices.

Last updated by jerremyW 1 year ago.

Assigned support staff: Lauren.

Author Posts
October 16, 2018 at 8:26 am #2820075

jerremyW

In custom XML, I can't seem to get the following elements to work.

- vc_custom_heading doesn't seem to work anymore after I've fixed custom XML figures, could you briefly check it? (text + link)
- icons links don't work, which I identified as "vc_icon_element" and "vc_icon_element-link" (link)
- the class "btn" is not necessarily a VC element, and can't get it working as of now. Did I do something wrong? (text + link

Thanks for your help!

<wpml-config>
    <custom-types>
        <custom-type translate="1">btn</custom-type>
    </custom-types>
    <shortcodes>
        <shortcode>
            <tag>vc_custom_heading</tag>
            <attributes>
                <attribute>text</attribute>
                <attribute>link</attribute>
            </attributes>
        </shortcode>
        <shortcode>
            <tag>vc_single_image</tag>
            <attributes>
                <attribute>link</attribute>
            </attributes>
        </shortcode>
        <shortcode>
            <tag>vc_single_image-wrapper</tag>
            <attributes>
                <attribute>link</attribute>
            </attributes>
        </shortcode>
        <shortcode>
            <tag>vc_icon</tag>
            <attributes>
                <attribute>link</attribute>
            </attributes>
        </shortcode>
        <shortcode>
            <tag>vc_icon_element</tag>
            <attributes>
                <attribute>link</attribute>
            </attributes>
        </shortcode>
        <shortcode>
            <tag>btn</tag>
            <attributes>
                <attribute>text</attribute>
                <attribute>link</attribute>
            </attributes>
        </shortcode>
        <shortcode>
            <tag>vc_btn</tag>
            <attributes>
                <attribute>text</attribute>
                <attribute>link</attribute>
            </attributes>
        </shortcode>
    </shortcodes>
</wpml-config>
October 16, 2018 at 5:12 pm #2821963

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

For the heading, please try this:

<shortcode>
<tag>vc_custom_heading</tag>
<attributes>
<attribute encoding="allow_html_tags">text</attribute>
<attribute encoding="vc_link" type="link">link</attribute>
</attributes>
</shortcode>

For the button, please try this:

<shortcode>
<tag>vc_btn</tag>
<attributes>
<attribute encoding="allow_html_tags">title</attribute>
<attribute encoding="vc_link" type="link">link</attribute>
</attributes>
</shortcode>

If it is a CTA, try this:

<shortcode>
<tag>vc_cta</tag>
<attributes>
<attribute encoding="allow_html_tags">h2</attribute>
<attribute encoding="allow_html_tags">h4</attribute>
<attribute encoding="allow_html_tags">btn_title</attribute>
<attribute encoding="vc_link" type="link">btn_link</attribute>
<attribute encoding="vc_link" type="link">i_link</attribute>
</attributes>
</shortcode>

For the icons, please try adding this:

<wpml-config>
    <shortcodes>
        <shortcode>
            <tag>iconbox</tag>
            <attributes>
                <attribute>title</attribute>
            </attributes>
        </shortcode>
    </shortcodes>
</wpml-config>

Please let me know if these shortcodes work to add the elements to the translation editor.

October 18, 2018 at 6:52 pm #2829249

jerremyW

Hi Lauren,

I literally copied the shortcodes you shared with me, vc_custom_heading is working now. The icons and buttons are still not recognized. In particular, the icons will cost a lot of time to manually edit, could you help me fix the shortcode for icons links?

October 18, 2018 at 8:44 pm #2829626

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I believe I have all the fields showing in the translation editor. Here is the correct shortcode for icons:

<shortcode>
            <tag>vc_icon</tag>
            <attributes>
                <attribute encoding="vc_link" type="link">link</attribute>
                <attribute>icon_fontawesome</attribute>
            </attributes>
 </shortcode>

and here is the correct shortcode for the buttons. These were not the standard Visual Composer buttons which is why they weren't showing up before.

<shortcode>
            <tag>thememove_button</tag>
            <attributes>
                <attribute>text</attribute>
                <attribute encoding="vc_link" type="link">url</attribute>
                <attribute>icon</attribute>
            </attributes>
 </shortcode>

Please let me know if you need any further assistance and I will be happy to help.

October 19, 2018 at 6:46 am #2830703

jerremyW

My issue is resolved now. Thank you!