Instead of using get_the_category()
use get_terms()
so something like this:
<img src="https://wordpress.stackexchange.com/questions/77017/whatever/directory/<?php $terms = get_terms("TAXONOMY_NAME'); echo $terms[0]->term_name; ?>.jpg" />
Related Posts:
- Custom Taxonomy Tree view
- Home page for a category / taxonomy
- My custom taxonomies are not showing up in the admin menus
- How can I add a field for featured image on backend of a custom Taxonomy?
- Not Able to Access Terms Under Custom Taxonomy Archive
- Theme template file for a specific custom taxonomy
- WordPress Two Level Filters on Getting Custom Taxonomy Terms
- Not Able to Access Terms Under Custom Taxonomy Archive
- What is the preferred way to add custom javascript files to the site?
- How to add posts to custom menus?
- How to remove search bar from a wordpress theme? [closed]
- Should I use set_transient or update_option?
- Best practice way to implement custom sections into a WordPress theme
- How to customize wordpress login/register pages?
- Add a preview to a WordPress Control Panel
- Change text of twentyseventeen_edit_link()
- How do I remove RSS feeds from themes?
- Advantages of using instead of wp_enqueue_style()?
- Style.css redirects to 404 Page not found
- Page attribute template dropdown not displayed even the syntax is correct
- When developing a distributable Theme, does it HAVE to be “inheritable”?
- Prevent update check for specific theme
- De-registering parent style sheet css recommended?
- inserting custom li class to wp_list_pages
- Theme check: Missing a text-domain
- Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?
- Unhook jQuery from WooCommerce via `functions.php`? [closed]
- Free starter theme to make mobile websites? [closed]
- WP Customize refresh problem
- How can I make that when I clic on one of the menu items, that page shows only posts with the same category?
- Hide header texts (Title & Tagline) in custom-header.php
- Why an arugment is missing in wp_get_attachment_image_attributes?
- Archive page doesn’t work
- My javascript jquery won’t work?
- How to add “Template” option in page attributes panel?
- How to edit my theme for full width?
- What VSCode extensions are there for working with block themes? [closed]
- What is the “correct” way to add hooks or similar PHP behavior to a blocktheme?
- Following Web Performance Optimization techniques to output static and dynamic css
- How to control on which pages the Aldehyde theme’s main slider is shown?
- Echo all category names, apart from one
- Is it possible to visually group items on the theme customizer?
- Internal Stylesheet in WordPress Theme development
- How to support letting users add their OWN logo to a custom theme?
- WordPress stylesheet isn’t being added
- How can I develop multiple widgets for a WordPress theme?
- Is there a way to optionally hide the title bar when logged in?
- Does code in function.php differ from theme to theme
- How can I optimize this code? [closed]
- How to create first post, fifth post full width, rest in three columns and so on
- How to Create custom xml file for demo content for custom theme?
- post_exists returning 0 if title contain special characters
- Theme not showing up
- Issue on Getting Custom post type Thumbnail’s URL
- Forms won’t submit
- How do I provide for multiple crops of the same image in a theme?
- Why WordPress AJAX returns undefined however it works fine when I add static url instead of dynamic function?
- Adding a new setting using Kirki or WP customizer with an if statement
- Twenty Seventeen Pages Loop
- How to add pages in wordpress using codes?
- How does the loop know which post to view?
- Pagination: Keep prev and next link even on the first/ last page
- How to remove permalinks links presents in each page of my site?
- Is there a way to serve different resolution images to different devices?
- How to substitute old wordpress menu by wp 3 menu the right way?
- Why my theme option not working?
- How to use multiple check-box values to work in a function and insert values in database
- How to make a function occurs for one time?
- Catch the moment when theme is deleted
- How to create a robust and logic class naming system in WordPress theme developing?
- Attribute form NumberControl doesn’t update when I update page before it lose its focus
- How to enable admin to upload multiple images to support header carousel slider theme in WordPress?
- create loop for the_content()
- how to change footer content for certain pages only
- function ‘theme_settings_page’ not found
- True or F False Setting of ‘with_front’ Parameter of Rewrite Is returning Exact Same result
- Custom Post Taxonomy Template Not Loading Properly
- Should I use template files or just use conditional tags in index.php?
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- Need help with adding custom wordpress menu and sub-menu
- get currently showed author ID in theme functions.php
- How to load mediaelement.js in theme template?
- How can I include the js and css file of my custom theme dynamically in header.php
- WordPress Blog Page displaying nothing
- Full width thumbnail
- Customizer API way function is_customize_preview() works only in main page?
- using theme check plugin to remove waring and errors from my theme
- paragraph format in WYSIWYG on a custom theme?
- unable to display the image meta value as background
- editor style css and page template with and without sidebar
- Suppress the_content filter in a nested loop
- Set start page depending on screen width [closed]
- How can I change the title of the Home link in the navigation bar?
- URL conflict with a ‘Single Page Layout’
- loading custom.js file after jquery is loaded
- How to determine if it is legal to remove credit link from theme?
- Add option for administrator to submit link
- Display recent posts on front page
- How to create sub-menu in “Allure Real Estate Theme for Placester”?
- How to Enable Hot Module Replacement with Webpack