This is untested, but I think it should work. Multiple categories will result in the category__in
query var containing an array of the queried categories-
if( isset( $wp_query->query_vars['category__in'] )
&& count( $wp_query->query_vars['category__in'] ) > 1 ){
echo 'multiple categories queried';
}
Related Posts:
- How Do I Protect My Premium WordPress App Theme from Copying?
- When to use _e and __ for the translation?
- Get entered value of customiser field for live preview
- With WordPress themes, where do I store the images and files relatively?
- Should `get_template_directory_uri()` be escaped?
- How to Include SVG sprites icons into the body tag? [closed]
- Why doesn’t /2013/01/ properly return January’s archives in archive.php?
- Excess White Space Above Admin Bar on Frontend Using Twitter Bootstrap
- Child Theme not loading parent CSS
- How to disable 3.1 “Admin Bar” via script for the admin user?
- WordPress settings API error when checkbox unchecked
- How the WordPress sidebar works
- two tinyMCE editors in the same page
- Replace Home with image link inside custom header menu
- Separated Comment from Post
- index.php is not loaded for single posts
- WordPress website loads but is not displayed until page scrolled
- wp_head() not inserting the default stylesheet style.css
- Theme Customizer not loading
- WordPress Customizer Control with React
- File Security Check in wordpress in index.php of theme
- how to implement wp_is_mobile on themes?
- Where is definied the theme location for the main menu in a WordPress template?
- How to disable automatic colors in the Twenty Twenty theme?
- Check if user has enrolled in Sensei LMS Course on Lesson Page
- Is my approach to enqueue styles inefficient?
- Part of Menu Item Hidden on Header Menu
- Child theme style.css versioning
- Disable front-page.php template
- How do the default themes reference style.css?
- Input ordering in wordpress theme customizer
- Customize the previous_post_link output
- How to use get_template_part instead of include_once?
- How to remove comment link title attribute?
- Which file handles the block latest posts, I want to examine excerpt handling
- Should we use ob_start() in WordPress short code
- Menu item added in wp_nav_menu_items filter is never highlighted
- Default string not appearing want to translate
- Single page site with history.js
- Using a page as home, how do I prevent nav from setting both home and page links active?
- How do i make a custom section’s setting display the default value in Customizer?
- Warning: A non-numeric value encountered in theme functions.php
- How can I ping update-core.php with a script?
- In this snippet how do I force the function to use gravatar rated G and fill in the alt for get_avatar()?
- “Add A Widget” button in the Customizer
- loading blank white screen of slide
- Set parent theme language with custom .mo files
- WooCommerce: multiple input field for multiple product variations
- Change template if tag selected
- Overide enqueue in non plugable function via child theme
- Broken theme, template is missing
- Starting point for custom Themes [closed]
- How to order by multiple date meta_values?
- How to reverse engineer the Twenty Eleven background image uploader?
- Theme Development -> Specific Homepage
- WordPress Theme With Modified View
- How to safely return the HTML?
- How do I modify the ‘more’ link in a feed
- Create something that can be added or removed in Customizer
- jQuery from parent theme loaded with many other scripts in a single min.js file
- Javascript development in Custom Themes
- Menu dispareing when visititing current page [closed]
- Under theme folder, what’s sequence of action for index.php, page.php, single.php?
- Allow filtering of loops for all categories
- Hide/disable sidebar using shortcode?
- Where are the options “template” and “current_theme” derived from
- What Can I do To Achieve this Effect: WIP -> Portfolio
- Trying to link to a php template file but its blank
- A Reviews Page is Showing root Index.php instead of Template-Page
- Twentytwenty theme p-tags break em- and strong-tags that span several paragraphs
- Image cropping isn’t working correctly when using Offload Media
- Can any IDE (eg PHPStorm, VS Code) correctly show functions added via require get_template_directory() string results?
- Array for WordPress Avatar Size and Class
- How to show metabox on page if it is using a template
- Mix it up & WordPress
- custom js script is not loading
- Template for front page (latest posts)
- How to toggle WP Customizer Panel and Section with JavaScript API?
- is_active_sidebar() problem
- WordPress uploads do not show up and I see the white screen of death in some cases
- How to fix an issue with customizer live preview?
- Code for creating three vertical columns in WordPress Bootstrap theme
- Primary Menu Showing All Pages With No Sub-Nav
- WordPress 3.9 two menus in same position?
- Image load issue with custom page template on Internet Explorer
- Custom widget not appearing on front end
- Theme Development : License help
- show posts in different styling
- wp_deregister_script was called incorrectly
- Undefined index: debuging error for theme option template snippet
- Multiple Content Shortcodes
- Add the ability of changing background color of a theme [closed]
- How to use esc_attr__() function properly to translate a variable that contains string?
- custom theme’s search not working
- Permalinks problem with custom theme
- Purchased Theme to Custom Made Theme? [closed]
- How to make website with many template that active [closed]
- Query for tag given slug
- Image Size wrong during upload
- Is there any halfway decent documentation on the wp.media JS class?