If you are using the_category()
(so without passing parameters), the result will be something like:
<ul class="post-categories">
<li><a href="https://wordpress.stackexchange.com/questions/262546/cat1">Category 1</a><li>
<li><a href="http://wordpress.stackexchange.com/cat2">Category 2</a><li>
</ul>
So a css line like .post-categories li a {font-family:Myfont;}
should do it.
Reference: the_category()
calls get_the_category_list
, which does the actual output. This function ends with a filter, which you could use to assign further classes, even to individual links.
Related Posts:
- Edit the markup of categories list
- How to get data about category in category.php
- How to check category of of custom post type or not
- Set a them for all subset of category
- Show posts from all categories
- altering theme – content generated by PAGES not PORTFOLIO
- How to check if I’m on the last page of posts?
- How to get category and archive title?
- Display random categories on the front page (Finding and Editing Theme Functions)
- Check if current category has subcategories
- wp_nav_menu not appearing for a couple pages
- Posts in multiple Categories different single.php
- wp_update_nav_menu_item() to insert categories
- Get page content by category or tag
- How to get the url to tag & category base set by the user?
- Multiple level category drop-down
- How to create a widgetized sidebar for every category dynamically?
- Category page showing posts from all categories
- Loop with Dynamic Categories
- Create a full width responsive header image per page
- Remove child products from woocommerce category page [closed]
- Using same slug name for a page and category
- List Categories of the Parent Category of the Current Category
- Remove “Category Archives: title” at the top of a category page [duplicate]
- Why adding Categories does not auto refresh in Backend while using my custom theme?
- How to have a static category/author page?
- Listing all posts from current category on page
- I use same slug name for category and page
- Page with the same name of a category
- is_archive() content being shown instead of is_category()
- Show posts of category in a page
- How to highlight the current page in the nav menu?
- Show pages and articles in category search result
- How to create taxonomy values for pages and list them in wp-admin
- Do I really need the div class entry?
- What type of page should i use? static page or category page? and what’s the difference? [closed]
- Duplicate Category and Page URL loads Category instead of the Page
- Convert a complex webpage into WP theme
- Add a specific category at a specific place to the menu that uses wp_list_pages
- How do I make the category template display full posts instead of partial posts?
- Single_cat_title() print the title before text
- Retrieve all posts within tag OR category?
- Viewing category pages without the word ‘category’ in URL
- in_category() works in single.php but not in page.php?
- Can’t load WP function into external function
- Categories vs. Page Site Organization
- Custom category code not showing all posts
- New Theme creation
- How do I automatically put categories and their descriptions on a WP Page?
- How to add “Read More…” link in twentytwenty
- Is it possible to restrict viewing of category PAGE to logged in users only?
- Hard coded main navigation
- How to call custom category field data in theme?
- How to make 2 tag feeds show up on 1 page?
- Different templates for different category tags
- Search in custom post type AND in pages with category
- Why category.php throw 404 in wordpress while calling paginate_links()?
- WP didn’t redirect to canonical category URL
- posts_nav_link(); picks up index.php instead of category.php as template
- Give a page priority over a category that has the same name?
- Multiple URL’s based on category for one post
- category permalinks
- How to “group” (categorize) the Pages together?
- Different banner for different section
- Custom category URL rewriting
- Putting a Category of posts under a Page
- How to Find the Page the Front Page is Using?
- How to place HTML tags in content from the_content()?
- Custom Walker for wp_list_categories
- Woo Framework: woo_cat_featured not populating
- How can you change the permalink for pages?
- Inside a loop, how to change CSS class based on category name?
- Should I use “Categories ” or “Pages” for a WordPress Static Site (A non blog site)?
- Category.php loads first before page.php?
- How to insert category list into post creation page, and retrieve chosen categories?
- How to do some action weekly?
- How do I display something on a particular category page?
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- Automatically redirect a page to a category that share the same slug
- Template for landing pages
- How to create a subcategory to a PAGE on WP?
- Question on using custom structures for categories
- Get the ID of 10 Latest Pages stored in a WordPress Category
- How to show 5 posts from specific category on related page?
- How do I get category and page ID’s?
- How to put page numbers with the next/previous on a post/category list?
- Getting the category title / description returns first matching post?
- How do I attach a page to a category similar to how we attach media to a post?
- How can I display tags as categories?
- So my theme doesn’t have a category.php file
- Trying to create a Categorised Index (archive?) to use as my Home Page
- Allow user to select categories that will display in post loop
- Insert HTML content in WP Query at specific point
- “Virtual category page” based on a custom field filter
- How do I retrieve the category ID (ugly permalinks) in my sub-navigation menu?
- Group search results by category
- How to track a users last visited page?
- Category page returns 404 error
- Getting the Most Recent Posts from Multiple Categories
- Showing Categories for Page Edit – without plugin