Site logo

Archived topic

WPML

5 replies · Started by Afreen on November 17, 2021

Viewing posts 1–6 of 6

I would like to add a toggle button of wpml at the top right side where the social icons, Let me know how could I do this, website link is on the private information section.

Hi Afreen,

Does the plugin provides a shortcode to add the toggle?

The social icons seems added with a block element, can you go to appearance > elements, see if there's a block element - hook, hook name might be generate_before_header?

You should be able to add the shortcode there.

Yes, there is the hook name you mentioned.

Then you can add the shortcode using a shortcodeblock, add it after the Buttonsblock.

CSS might be needed to put the shortcode block in the same row with the social icons, try this:

.gb-container-7a9d081a .gb-inside-container {
    flex-direction: row;
}

Let me know if it works.

I think this is not easy as I think as its required PHP code editing and I am not using child theme now so don't take any risk, below are some queries I would like to ask you

1. Do I need to install the child theme and then edit the shortcode provided by wpml?
2. If anything mess up on the website can I easy to retrieve it by using the child theme as I am new to this?

Link added on the private information provided by wpml website shortcode example.

Hi Afreen,

I think this is not easy as I think as its required PHP code editing and I am not using child theme now so don’t take any risk, below are some queries I would like to ask you

There won't be any need for PHP editing if you're only going to use some default shortcode WPML already provides.

You can use the Custom HTML block or the Shortcode block within Block element you're trying to edit to place the required shortcode. :)

Example: https://share.getcloudapp.com/o0u7Jvwq

This archived topic is closed to new replies.