I think your problem lies in is_category()
. This conditional check if you are on a category page, not if a post belongs to a category.
To check if a post belongs to a category, you should be using has_category
So your conditional statement should be
<?php if (has_category('Legal Libation Columns') && has_tag('Legal Libation Columns')): ?>
EDIT
Thanks to @Nilambar, there is a syntax error as well in your code as he said
Here are some tips
-
Don’t use
:
andendif
. If makes code difficult to read and it is not code editor friendly. Rather use curly brackets{}
-
When developing themes and plugings, or just make changes to a site, set debug to true. Such errors is easy recognizable with debug set to true. Please take the time and read Debugging in WordPress
-
Always indent your code properly to make it easier to read and follow
Related Posts:
- Is there a reason I cannot get the current category in a loop?
- Echo text using is_tag
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Control term order on a per-post basis
- Rewrite URL with category and tag combined using WP_Rewrite
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Use tag interface for hierarchical taxonomy?
- Using URL parameters, list posts from category and custom taxonomy
- Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
- Create subdomains for tags and categories
- Automated adding of one tag to all the posts in a category
- Moving Categories submenu to Media, but still opens Posts menu
- When using get_categories or similar, is it possible to filter results that contain certain Tags as well?
- How to totally get rid of Category in my blog?
- Showing all the posts in one page?
- Categories and Tags returning 404 on the sidebar when using ugly permalinks
- has_category() for parent category
- Deleting All tags except categories Wp database
- Is it possible to put tags and category information in the post as text?
- Script to duplicate categories as tags
- Search by word, category, tag, author
- How to filter archives both by category and tag?
- display most popular tags of category?
- Can paginate_links() be customized for a specific category or tag?
- Any way to assign Post Categories and Tags to Links?
- Category archive page – loop through posts of certain tag (with pagination) – pre_get_posts
- Custom WP_Query for current category (in category.php)?
- functions.php conditional tag – only show in single.php?
- Are Category or Tag Archive Pages Possible?
- How can I duplicate categories and tags?
- How to run select query of post with category and tags for API?
- Random post + categories + tags
- Search Posts / Pages with multiple options?
- RSS/XML of all Categories and/or Tags
- Get Tags specific to Category using WooCommerce plugin
- How to get related tags based on a category?
- Needing a snippet for listing category specific tags
- How to display categories which contains particular tag?
- “Categories” for six authors [closed]
- How to list categories within tags?
- How to “group” (categorize) the Pages together?
- Is There a Difference Between Taxonomies and Categories?
- Use Tag input metabox style for Categories
- How can I hide tags on a child-category page, if that tag has not been used?
- Custom SQL Query: Get all posts with category id and a concated list of tags on each post
- limit a list of tags to one category [closed]
- Have multiple category queries from the URL been fixed yet?
- Related Tags not in category
- scaleability of tags
- How do I add a tag slug to a category URL to filter posts?
- Show the amount of posts in a tag in a specific category has
- Display all product tags associated with a specific product category
- How replace individual elements in the RSS feed with a single string
- Adding a H1 Tag to Post Tags automatically, but hide the tag? (Same for Category)
- Include either name or slug in the include parameter using wp_list_categories?
- List all posts of certain category which share some tags
- How can I filter posts by tag on the fly
- Retrieve post tags from from main wp_query
- Advanced permalinks structure
- How can I include custom category and tag base in template files?
- Custom menu with categories and tags
- display specific category when website loads
- Automatically adding tags and categories into Post Excerpt for searching
- Return all Tags and Categories in Separate List
- How to filter tags by category?
- Count how many posts have a specified tag AND category
- How to prevent tag “iframe” from being deleted from the heading description of rubric?
- echo $category[0]-> cat_name; shows only one category name
- When creating category, it creates automatically tag, or, when creating tag, it creates automatically category in same name
- Using heirarchial tags or Custom taxonomies
- Multiple if statements with else for get_the_category [closed]
- Balance Tags to the_content Words Length
- Category and tag urls return 404 error
- custom browse by
- How to echo Tags and Categories as plain text
- Categories and Tags Conflict after Woocommerce Installation
- How can I add metaboxs to Admin Bar?
- Split posts into 2 separate streams
- Exclude posts with certain tags in category archive
- Getting Post Tags From Certain Categories
- How to exclude category and post_tag taxonomy while displaying custom taxonomy?
- showing tag beside catagory
- 404 error when i try to search by category or by tag
- How to remove specific categories from tag archives?
- Page Type with Category Link
- A simple question regarding tags and categories
- Display related posts with same category or same tag return blank
- How can I allow people to ‘subscribe’ to categories?
- How to add an empty entry to masonry?
- Own Custom Tags/Category page ( posts)
- Loops in category description
- How to create a category or tag available exclusively to the admins and not to the users?
- Tracking multiple tags or categories
- How to load jquery tag-it plugin into admin?
- Modify functions.php to add a term ‘uses-theme’ set to theme name on post save
- List products from current category
- Query posts that have all the specified tags
- Weird html output of single_cat_title – is not inside of the html element?
- Moving Blog and Changing URL
- In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing