当前位置:网站首页>How to Add Category-Specific Widgets in WordPress
How to Add Category-Specific Widgets in WordPress
2022-08-05 03:05:00 【IDC Industry Observer】
Widgets are definitely a highlight of WordPress.Unfortunately, many users use gadgets without really realizing their true potential, resulting in a cluttered sidebar or two, depending on your theme.
Luckily, there is a solution on your WordPress dashboard in the form of a JetPack module called Widget Visibility.
This little module alone lets you display certain widgets on certain articles or pages -- basically, it gives you fine-grained control over your widgets and where you want them to appear.
With this module activated, there is no limit to the number of "different" sidebars you can have.
You can display certain widgets on your homepage, a different set of widgets on your "About" or "Contact" pages, and a completely different set of widgets on your posts or specific categories.
Let's see how to do it!
Add a specific category of widgets in WordPress
The first thing you need to do is install the JetPack plugin, if you haven't already.
If Jetpack is already installed on your website, then you're ready to go.
First step:
The first thing you need to do is log into your dashboard, mouse over JetPack, and go to settings.
Scroll down until you see Widget Visibility.Click the module name, then click Activate.
Step 2:
Now that you've activated this module, let's see how to display widgets only for certain categories.
Let's say you want to display more articles from that category on an article in the same category.
The easiest way to do this is to first create an image for your category (something simple in Picmonkey will do) and upload the image to your media library.
Then grab the URL of the uploaded image.
Step 3:
Next, go to Appearance > Widgets and drag the Image widget to your sidebar.
Fill in the fields for Image URL and Image Size to ensure it displays correctly.In the "Link URL (when the image is clicked)" field, enter the link of your desired category.
Now, here comes the fun part!
Step 4:
Click the Visibility button and select Display.Change the desired gadget type from the drop-down menu.Then click Save.
The gadget will now only appear on posts belonging to the specified category.
Visibility is controlled by five areas: page type, category, tags, date, and author.
For example, if you want the author widget to only appear on posts by that author, select "Show" from the first drop-down menu and add two rules."The author is" and "The author you want".
Similarly, you can choose to hide certain widgets from certain pages.
Like the author widget example above, you can choose to hide it on your About page, as it really doesn't make sense to have it appear there.In this case, you can change the first option of "Show" to "Hide", then select "Page", and then select the corresponding static page from the final drop-down menu.
Each visibility rule is handled individually.For example, there's no way to only show widgets on posts that are categorized as "recipes" and tagged as "breakfast ideas."You can only choose one or the other.
From https://cn.bluehost.com/blog/wordpress/15915.html
边栏推荐
- leetcode - symmetric binary tree
- How OpenGL works
- (十一)元类
- 1667. 修复表中的名字
- 优炫数据库的单节点如何转集群
- 1527. Patients suffering from a disease
- A small tool to transfer files using QR code - QFileTrans 1.2.0.1
- Data to enhance Mixup principle and code reading
- Native js realizes the effect of selecting and canceling all the multi-select boxes
- 引领数字医学高地,中山医院探索打造未来医院“新范式”
猜你喜欢
2022-08-04: Input: deduplicated array arr, the numbers in it only contain 0~9.limit, a number.Return: The maximum number that can be spelled out with arr if the requirement is smaller than limit.from
使用二维码传输文件的小工具 - QFileTrans 1.2.0.1
Dynamic management of massive service instances
shell statement to modify txt file or sh file
金仓数据库如何验证安装文件平台正确性
Access Characteristics of Constructor under Inheritance Relationship
引领数字医学高地,中山医院探索打造未来医院“新范式”
Principle and Technology of Virtual Memory
View handler stepping record
龙蜥社区第二届理事大会圆满召开!理事换届选举、4 位特约顾问加入
随机推荐
sql server 安装提示用户名不存在
Syntax basics (variables, input and output, expressions and sequential statements)
Intersection of Boolean Operations in SuperMap iDesktop.Net - Repairing Complex Models with Topological Errors
1527. Patients suffering from a disease
倒计时 2 天|云原生 Meetup 广州站,等你来!
大像素全景制作完成后,推广方式有哪些?
Access Characteristics of Constructor under Inheritance Relationship
Countdown to 2 days|Cloud native Meetup Guangzhou Station, waiting for you!
The linear table lookup
【Daily Training】1403. Minimum Subsequence in Non-Increasing Order
Open Source License Description LGPL
通过模拟Vite一起深入其工作原理
Note that Weifang generally needs to pay attention to issuing invoices
word column notes
lua learning
百日刷题计划 ———— DAY2
sql server installation prompts that the username does not exist
Use SuperMap iDesktopX data migration tool to migrate map documents and symbols
冒泡排序与快速排序
mysql tree structure query problem