Related Posts
Con Elementor, puede agregar atributos HTML personalizados al elemento de cada link. Esto permite la adición de atributos data- *, atributos ARIA (accessibility) y valores, encabezado, pie de página, barra lateral, rel = * y otros atributos que se pueden encontrar aquí: https://www.tutorialspoint.com/html5/html5_attributes.htm
Common Link Attributes use cases include:
- Allow your visitors to download PDF files with a single button click using the download = "yourfilename" attribute personalizado.
- Implementar propiedades de SEO de relaciones como rel = "noopener", rel = "noreferrer", rel = "ugc"and "Rel = sponsored".
- Add a caption attribute to the link elements, such as title = «More information about us».
Tip: You can add multiple link attributes separated by a comma (,)
Add custom attributes to link elements of a widget
If a widget has a link element, you can add any custom attribute to the link's HTML (eg. rel = "ugc" or rel = "sponsored", los dos nuevos atributos de enlace que introdujo Google en 2019).
- Right-click on the widget controller and click Edit widget to open the widget settings panel.
- Click the gear icon to the right of the Link field to open additional options.
- Add your code in the Custom attributes field, using the format key | value. For example, to add rel = "sponsored" to the element's HTML, enter rel | sponsored here. To add rel = ”ugc” to the element's HTML, enter here rel | ugc. To add a title to the link element, enter the title | Your title text goes here.
Tip: Si agrega un atributo de título, solo se mostrará como una información sobre herramientas emergente al pasar el mouse si hay algo en el campo Url del enlace, por lo que debe haber al menos un # in the countryside. It cannot be blank for the floating tooltip to work.
Note: No es posible agregar un atributo personalizado a un enlace creado dentro de un widget de editor de texto. Los atributos personalizados solo están disponibles para widgets que tienen específicamente un campo de vínculo.
Add custom download attributes to a button
Para hacer que un archivo se descargue inmediatamente cuando un Username hace clic en un botón, agregue un atributo download = ”yourfilename” al enlace del botón.
- Right-click the button widget control and click Edit widget to open the widget settings panel.
- Click the gear icon to the right of the Button Link field to open additional options.
- Add the attribute code in the Custom attributes field, using the format key | value. For example, to add download = "yourfilename" to the element's HTML, enter download | your-file-name here, replacing "your-file-name" with the file name of your choice.
Tip: To create a Downloadable PDF, at Link , enter the PDF link, and then enter download | your-file-name in the Custom attributes field.
Note: You won't be able to add JS-based attributes (like onclick) to your links due to security reasons.