当前位置:网站首页>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
边栏推荐
- Chinese characters to Pinyin
- Why did they choose to fall in love with AI?
- [Storage] Dawning Storage DS800-G35 ISCSI maps each LUN to the server
- 数学-求和符号的性质
- 【软件测试】自动化测试之unittest框架
- word column notes
- Snapback - same tree
- Syntax basics (variables, input and output, expressions and sequential statements)
- 剑指offer专项突击版第20天
- The 22-07-31 weeks summary
猜你喜欢
Data storage practice based on left-order traversal
Talking about data security governance and privacy computing
lua学习
Countdown to 2 days|Cloud native Meetup Guangzhou Station, waiting for you!
How OpenGL works
Apache DolphinScheduler, a new generation of distributed workflow task scheduling platform in practice - Medium
word column notes
Question about #sql shell#, how to solve it?
The linear table lookup
Details such as compiling pretreatment
随机推荐
金仓数据库如何验证安装文件平台正确性
mysql tree structure query problem
Lexicon - the maximum depth of a binary tree
2022高处安装、维护、拆除考试题模拟考试题库及在线模拟考试
Use @Mapper to query the partition status of oracle and report an error
告白数字化转型时代,时速云镌刻价值新起点
1484. Sell Products by Date
undo问题
word分栏小记
OpenGL 工作原理
Intersection of Boolean Operations in SuperMap iDesktop.Net - Repairing Complex Models with Topological Errors
dmp (dump) dump file
sql server installation prompts that the username does not exist
dmp(dump)转储文件
剑指Offer--找出数组中重复的数字(三种解法)
解决端口占用问题 Port xxxx was already in use
QT: The Magical QVarient
undo problem
剑指offer专项突击版第20天
龙蜥社区第二届理事大会圆满召开!理事换届选举、4 位特约顾问加入