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? 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:
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.
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.
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.
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.
You should read it
- This little trick can make your Widget invisible on iOS 14
- How to disable Widgets on iOS 10 lock screen?
- How to use Color Widgets to create calendar and battery widgets on iOS
- Steps to use BeWidgets to display eye-catching widgets on Windows 11 interface
- Microsoft tests a new, more intuitively tweaked Windows Widget menu interface
- Microsoft confirms Windows 11 users will soon be able to delete news items in the widget menu
- How to stack widgets on iPhone to compact the screen
- Instructions to download beautiful widgets for Xiaomi
May be interested
- 'Backdoor' plugin, WordPress 3.2 RC2 launchesa series of popular plug-ins for wordpress are found to contain 'backdoor' in the source code, which can help hackers gain access and hijack the blog / website.
- Hackers break into WordPress serversan unidentified hacker hacked into the wordpresss server and installed a remote control trojan and download versions of this widely used blog application.
- WordPress.com blog service collapsed because of a DoS attackthe server hosting the blog wordpress.com was hacked from dos last saturday until the end of tuesday morning (february 19), making it impossible for users of this site to log in and post on their blogs.
- Build a blog with WordPressmost of those who are new to blogging often use free services with fixed, poor options.
- Open your own online store with WordPressnot only is a professional blogging service, wordpress also allows you to 'build' an online store right on your blog.
- 10 free WordPress plug-ins for bloggersif you are a blogger using wordpress, the following article will provide you with powerful free support plug-ins, helping you build a complete blog.