I think this is what you want:
$qobj = get_queried_object();
var_dump($qobj->term_id);
get_queried_object will get information about the current page. That information varies by type and content for different pages but on a taxonomy page it will give you a stdClass object with taxonomy data related to that page..
Related Posts:
- How to add custom css file in theme?
- Using classes instead of global functions in functions.php
- How to move page template files like page-{slug}.php to a sub-directory?
- Add custom classes to anchor in wp_nav_menu
- How to remove search bar from a wordpress theme? [closed]
- Get url of thumbnail from the media uploader
- Are the WordPress Core CSS styles really all nessesary?
- Should I use set_transient or update_option?
- Allow Shortcode in Theme Customizer
- Where to post/upload the new theme for WordPress theme repository
- Setting multiple default background images?
- How to make a theme with more than one CSS file?
- Best practice way to implement custom sections into a WordPress theme
- Where can I find a good reviewed collection of Twenty Ten child themes?
- How do I get gallery thumbnail URL and change the default thumbnail size?
- Front End Post Submit Form
- How do I remove RSS feeds from themes?
- Select menu on browser resize
- add_theme_support( ‘custom-header’ ) does not add option menu in dashboard
- Can I upload WordPress-react theme in Wp theme repository
- Advantages of using instead of wp_enqueue_style()?
- Style.css redirects to 404 Page not found
- Displaying wp menus by name without using theme locations
- How to add suggest plugin to theme?
- Upgrading a custom theme through the Dashboard
- Prevent update check for specific theme
- Do I really need the div class entry?
- Get list of months with posts
- Cannot get full thumbnail size using the_post_thumbnail
- Version control for both Vagrant config and themes being developed [closed]
- Is there a way to activate different theme for specified users? [closed]
- how can I remove the sidebar from my wp homepage [closed]
- Does any theme support child theme?
- using wordpress without javascript
- How do I save a wordpress theme’s files and install them on another site?
- Theme Check: Could not find post_class
- “add_theme_support” for custom footer color?
- Why wp_head() function not loading style.css?
- Set multiple templates per post
- WP 3.1 upgrade breaks AutoFocus+ theme
- How can I display/hide certain content based on a Theme Option field?
- create-guten-block in wordpress theme?
- How can I make that when I clic on one of the menu items, that page shows only posts with the same category?
- How to add infinite scroll?
- get_option in header.php not returning value from customizer
- Internal error 500 accessing Theme > Customize
- How to add “Template” option in page attributes panel?
- Which html elements should be styled in wordpress theme
- Theme Development: Starter Content after hook
- Change locale by detecting viewer’s browser language setting and let them choose prefered language after
- Why is it needed to enqueue parent stylesheet in child theme?
- Folder name for a pro version of a WordPress.org theme?
- Is there any WordPress theme for Self Storagae just like Spacer [closed]
- Customizer: save setting/control content to post/page
- WordPress Unite Theme: Footer isn’t sticking [closed]
- Is accessing theme and using customizer GPL distribution?
- How to enqueue javascript for WP Customize options sidebar?
- WordPress 500 Internal server error when activating custom theme [closed]
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Overrite parent functions using child functions
- Does code in function.php differ from theme to theme
- How can I change the theme of different posts using a plugin?
- Theme not showing up
- Change image size depending on page
- Why still output /wp-content/themes/twentynineteen?
- get_header action not working
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- Remove h1 from 2015 theme
- WordPress pulling in random page themes
- Some doubts about WordPress handle the horizontal main menu visualization
- Can’t change theme name
- 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 make a function occurs for one time?
- How do I restructure the comment HTML layout?
- Theme: dropdown hover menu not showing up in IE/Edge
- Problem with pagination link (error 404)
- how to ensure responsiveness in wp themes? [closed]
- home is not working in wordpreess
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- Local theme changes upload on server but theme changes not showing
- WordPress Custom font not found
- New created Theme leads to malfunctioning Xampp Apache –> functions.php is cause
- WordPress Blog Page displaying nothing
- Magnific Popup – Add Caption to Images
- Why do WordPress developers use so many opening and closing PHP tags when developing themes? [duplicate]
- Safe way to echo wp_trim_words
- How can I demonstrate themes well?
- How to update my own theme?
- WordPress custom jquery not found
- Custom link color or stylesheets
- How to remove proudly created by WordPress in theme?
- How do I add new layout width options in WordPress editor?
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?
- Is via.placeholder.com a good site to auto-generate placeholder images?
- Should we escape the values of constants?
- Trying to create a cutom query with pagination and page 2 breaking. Any help?
- Why is wp_nav_menu() not removing the container around the nav ?
- Full Site Editing, Block Theme, Gutenberg, Site Editor