X
X
X
X

Wissensdatenbank

StartseiteWissensdatenbankWordPressWordPress – Image & Text Widgets

WordPress – Image & Text Widgets

Adding an image through Text Widget

 

Images in WordPress can function as widgets. This means that you can add them to the theme sidebar or footer and they will appear on all pages and articles.

There are two ways to add an image: you can use the Text Widget or install an additional plugin with the same functionality.

Text Widget

With this Widget you can add plain text or HTML code on your website.

To add an image to your website by using the Text Widget, you will need to use HTML code.

For example:

<img src="/wp-content/uploads/myimage.png" />

/wp-content/uploads/myimage.png – Here you must specify the exact path to the image. You first need to upload it on the website where you can see its path in Files – > Library – > Edit – > URL:

You can add CSS to center or resize the image.

For example:

<img src="/wp-content/uploads/myimage.png" />

style=”max-width:100%;” – This CSS property defines the maximum image size which is adjusted to fit the image container.

If you want to link the image to an URL address, put the img tag inside a href tag.

For example:

<a class="helplinkext" href="http://mysiteurl.com/url.html">
<img src="/wp-content/uploads/myimage.png" />
</a>

mysiteurl.com/url.html – URL which will load when someone clicks on the image.

Image Widget

Adding an image with Image Widget (plugin)You may look for a plugin that provides the same functionality. Such plugin is the Image Widget. After you install and activate this plugin, the Image Widget will be available under Appearance -> Widgets menu.

Place the widget in the website section where you want the image to be displayed (e.g. sidebar area). You can select an image from the Media Library or upload a new one.

The image settings enable you not only to link the image to a specific URL address that will be loaded when it’s clicked, but also to specify whether the URL will be opened in a new or the same window and to add image size, alignment and title.

  

Finden Sie nicht die Informationen, die Sie suchen?

Ticket erstellen
Fanden Sie es nützlich?
(5704 mal angesehen / 423 Kunden fanden es hilfreich)

Top