WordPress widgets, here’s how it works!

WordPress widgets, here’s how it works!
datum-geschreven 29 Feb 2024

WordPress widgets are small plugins that you can place in the sidebar. They are easy to activate, move around, or temporarily remove.

There are many types of widgets, and WordPress comes with default widgets that display the latest posts, a widget for admin login, a widget to display posts per month, a widget to show the latest x number of posts, and a widget with a calendar. The most commonly used widget is the text widget, which allows you to display HTML and text.

As you can see, there are many possibilities, and they are highly flexible since you can simply drag and drop them without any programming.

Additionally, there are many modules/plugins that generate widgets, so you can use them in the sidebar.

This is how a widget looks in your admin

voorbeeld tekst widget

By default, the widgets are collapsed, but you can click on them to expand and make adjustments. Here you see a text widget, where you can set the name of the widget that will be displayed above the widget on your website. Below, you can place HTML and text.

To use PHP within your widget, you can download a module/plugin that allows PHP execution in the text widget.

After making changes, don’t forget to click the “blue button” to save the changes and publish them live.

Saving unused WordPress widgets

voorbeeld widgets die niet gebruikt worden

Imagine you have written some text in the text widget, or you have a widget with many configuration options. You might want to save it even if you don’t want to display it live at that moment. You can do this by collapsing the widget and dragging it to the “Inactive widgets,” where the settings will be saved until you want to use it.

Dragging WordPress widgets

wordpress widget slepen

Dragging is quite straightforward, but you need a theme with a sidebar to do it. If dragging or saving doesn’t work correctly, it may be due to insufficient browser support (old browser) or a malfunctioning WordPress admin. Tip: Trying again with another browser or re-uploading the admin might help.

5 super widgets!

  1. The “Count per day” widget displays the visitor count in your sidebar.
  2. The widget that comes with the Contact forms 7 plugin allows you to display a contact form in the sidebar.
  3. The WP Polls widget displays a poll in your sidebar.
  4. With the Nextgen Gallery plugin and its accompanying widget, you can display a slideshow or photo album in your sidebar.
  5. You can execute PHP in your widget with the PHP text widget plugin. By default, WordPress doesn’t allow PHP execution.

De meeste artikelen worden geschreven door Mathieu Scholtes, de eigenaar van WPBeveiligen. Op de hoogte blijven van het laatste WordPress nieuws? WordPress tips? WordPress aanbiedingen?
Connect dan op Linked-in!

Heb je een vraag? Tip of gedachte? Deel die!

Abonneer
Breng me op de hoogte
guest
0 Reacties
Inline Feedbacks
Bekijk alle reacties