is_category
will not process the logic inside the argument list. This:
is_category('glorkian' || 'glork')
The condition is true on all category pages. What I think is happening is that PHP does parse that argument string, but is always going to be true. Try this:
var_dump('glorkian' || 'glork');
Meaning that what you are doing, essentially, is this:
is_category(true);
That is not a valid argument but the function seems to revert to default functionality– is this a category archive or not? Obviously, the answer is “yes” on any category archive.
Valid arguments are:
(mixed) (optional) Category ID, Category Title, Category Slug or Array
of IDs, names, and slugs.http://codex.wordpress.org/Function_Reference/is_category#Parameters
So I believe that what you need is :
is_category(
array(
'glorkian',
'glork'
)
);
It is the same with has_category
.
Related Posts:
- How can I use a sliced image As banner? [closed]
- How do you remove header sitewide from mobile only?
- populate form fields in a loop with ajax
- Error in custom php function doesn’t exist
- Customizer: active_callback and sanitize_callback incompatibility?
- post created but no permalink
- Populate editor with some content of a page with a page template
- Two queries for a WP_User_Query search work perfectly apart, but not together
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Catchable fatal error: Object of class stdClass could not be converted to string after WP 4.7
- Menu jumping when calling it via PHP
- My php header() function is not working [closed]
- Displaying recent posts on static page with template-part via shortcode
- How to edit widget code to add unique class name to each div?
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- Skt full width basic slideshow problem
- “imagejpeg” function is not working in wordpress
- wp-comments-post.php file returns a blank page
- How to disable controls in theme customizer?
- How do I link a button I created in theme customizer to a function?
- Trying to retrieve post meta
- can i fetch a custom metabox data in another page or post type?
- Insert custom PHP head above in WP pages
- Headers already sent in Pluggable.php / homepage and wp-login error
- Is there a way to conditionally check whether a WordPress post title is empty?
- Is_front_page inside header.php is always returning true
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Does wordpress templates always in files or in database?
- get_template_part for specific page
- How do I create my own .php file with a code part and echo it on different pages?
- Adding Meta Tags to a Post using its Tags, Excerpt and content
- How to remove woocommerce_breadcrumb() from do_action( ‘woocommerce_before_main_content’ ); [closed]
- ‘Post-thumbnails’ feature does not seem to register
- if statement with is_active_sidebar()
- WordPress admin-ajax.php
- Use .php file as page instead of wordpress page & template file?
- Use WordPress function in php file
- Moving code from theme header to functions.php
- What does this mean in wordpress? Easy question
- How to obtain the current website URL in my theme?
- Syntax error when I try to insert my loop into an unordered list? [closed]
- What exactly do this function declared into functions.php file of a WP theme?
- Admin ToolBar not being displayed at top of site
- Royalty-Free Sliders used in theme development
- WordPress wp_redirect error
- Having Issue on Redirecting With Session in WordPress
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- How to set up a If is_singular statement?
- Reason to add a name of the theme like (‘menu-1’ => __( ‘Primary’, ‘twentynineteen’ ),) in PHP?
- Underscore – Self hosted fonts
- Separation of presentation and code – WordPress
- Search form does not work in my website
- Show About and Contact Us page when they’re clicked in the top menu.
- Is There A Way To Make Theme Files Accept Shortcodes?
- get_template_part() not firing within a switch statement when template has new WP_Query
- WordPress Customizer Default Image
- How to call multiple functions from multiple files into a WordPress page template [closed]
- Theme’s Options Page included with require_once *.php in functions.php not visible anymore
- linking stylesheets and scripts with functions.php
- zip unzip attachments in wordpress
- Get title attribute from galleries
- How to show an entire post content and not also the excerpt?
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- WordPress import media error
- Why in my theme I can’t see all the statics content under the posts?
- get_template_directory adding FTP root folders in urls
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- Location of core code for database connection and get_header
- Clickable image link sends people to wrong URL
- Theme not calling Jquery properly
- unknown issue in ‘header.php’ preventing theme from displaying fully
- WordPress get_media_embedded
- Hide Heading if ACF Field is empty
- What is the best way to define constant options for a theme?
- How to add the sidebar to all the pages except the home page? [closed]
- Header not properly displaying on archive.php
- How do I get the content excerpt of the recent post?
- Save Custom CSS file in the upload folder dynamically?
- Add meta tags to a custom header
- Live to Local on MAMP, not working, outputting functions.php code
- How to specify the path for require_once in a child theme?
- Warning: printf(): Too few arguments in helpers.php file
- Double Curly Brackets in Php
- How to make function appear in sentence?
- Widgets not showing on custom theme
- Is this a correct usage of ob_start() in my WordPress project?
- Get post categories
- wp_nav_menu not working correctly in my underscores theme
- Validate and Sanitize WP REST API Request using WP JSON Schema?
- get_page_template_slug returns incorrect path
- Getting posts to exclude from array
- Get all posts as an array ID => Name
- home.php show blog posts as grid view
- Custom post type permalinks do not appear using the link functions
- Is there a name for trivial WP PHP files like functions.php, archive php entry.php, page.php and so forth?
- Change header on pages displaying taxonomy items
- Help Fallback (thumbnail)
- How to Update an old theme for the latest wordpress version
- How can I search all plugins for composer’s vendor/autoload.php?
- Adding Updated Post Date PHP Custom Theme