Adding dynamic widgets to WordPress blogs without using code

If you own a WordPress site, do you want to display different widgets on every page in your blog? How to do this in WordPress?

If you own a WordPress site, do you want to display different widgets on every page in your blog? For example, you have a blog about travel in different countries and want a sidebar that displays a French hotel when the article's content is about France, or a widget for Italian restaurants while exchanging. information about Italy . How to do this in WordPress? Especially when not using code. The following article will introduce you to the utilities that can solve this problem.

Conditional Widgets

As its name implies, Conditional Widgets is a plugin that allows you to define a conditional rule for each and every widget.

After downloading and activating the program, go to your Widgets page and add the desired widgets in the usual way. The difference now is that in each widget, there is a option for you to configure it when installing in the blog. See the picture below:

Adding dynamic widgets to WordPress blogs without using code Picture 1Adding dynamic widgets to WordPress blogs without using code Picture 1

You can make it show / hide on the homepage, certain categories, even for certain pages. It also supports sub-categories and subsites. You only need to define the rules for the parent / catalog, automatically the sub-categories / pages will perform in a suitable way.

However, the program does not allow you to configure on each lesson.

Widget Logic

Widget Logic is less intuitive than Conditional Widget, but it gives users the flexibility to determine the appearance of widgets. Widget Logic uses conditional tags in WordPress to do that.

For example, if you want the widget to appear on an article with an ID of 46, set the conditional keyword is_single (46) in the Widget Logic field.

Adding dynamic widgets to WordPress blogs without using code Picture 2Adding dynamic widgets to WordPress blogs without using code Picture 2

Section Widgets

The Section Widgets operation method is a bit different from the above two utilities, but this is also the most powerful tool in the 3 utilities that this article wants to mention. Different from logic, Section Widgets also allows you to create a sidebar without writing your own code.

After installation is complete, go to Themes > Section Widget . This is where you can customize the tabbed interface. The program comes with 25 master interfaces to choose from. If you are not satisfied with the topic, you can create your own style.

Adding dynamic widgets to WordPress blogs without using code Picture 3Adding dynamic widgets to WordPress blogs without using code Picture 3

In the Widget section, instead of having to add a logic condition for each and all widgets, you will add the ' Sections ' widget corresponding to the sidebar so that it appears. Each widget section comes with two parts: The upper section is where you define the conditions (for the page / category to appear). The lower part is to display HTML code.

Adding dynamic widgets to WordPress blogs without using code Picture 4Adding dynamic widgets to WordPress blogs without using code Picture 4

To add a tab widget, drag and drop the ' Section (tabbed) ' widget to the corresponding sidebar. Similarly, the upper part is where you define the logic, below is where to create tabs and add content to it.

Adding dynamic widgets to WordPress blogs without using code Picture 5Adding dynamic widgets to WordPress blogs without using code Picture 5

4 ★ | 2 Vote