Say I have a post called Hello World in Wordpress and I'm directly viewing this page, how would I go about finding the category of "Hello World" and displaying it?
相关问题
- Display product ACF field value in Woocommerce tra
- Adding a custom button after add to cart button in
- How to add a “active” class to a carousel first el
- Setting custom order statuses as valid for payment
- change the font size in tag cloud
相关文章
- wordpress新增页面如何个性化设置
- C#中 public virtual string Category { get; }这么写会报错:
- select query in wordpress
- Get WooCommerce featured products in a WP_Query
- Woocommerce update shipping methods in checkout vi
- Change order status just after payment in WooComme
- How to download image using rest template?
- Get size of Bitmap Android [duplicate]
You can use
which would output them in a comma separated list.
You can also do the same for tags as well:
Use
get_the_category()
like this:It returns a list because a post can have more than one category.
The documentation also explains how to do this from outside the loop.