$category
is an object containing member variables, you have to check the specific member var you want to compare.
change:
if($category !== 'Featured')
to:
if($category->name !== 'Featured')
Related Posts:
- Inject post (from specific category) between posts in Loop
- User Defined order on get_categories?
- Custom Loop through category menu to include sub categories
- Filter Select results based on selection
- Alert Bar section within WP loop is displaying even though there are no posts
- Display category name only once inside loop
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- How do I remove a category from a wordpress loop>
- How to get the last category name of a child category?
- How to get current post category details inside “loop”?
- Problem with custom loop and wp_list_pluck [closed]
- Echoing a CSS class based on category of post in a list
- Do not duplicate posts with multiple categories in multiple loops
- Return to the beginning of the results of a for loop
- Exclude category and post from loop in custom category.php
- Error trying import one category on page
- Remove the_content From Loop
- Display current category title on category page
- Installing wp3.2.1 on IIS; getting empty sessions
- Want to separate sections of posts. Can you restart loop?
- List all categories but exclude current post category on single post page
- Specific Loop For 2 Within Each
- Two posts in same div – WP loop
- Woocommerce, recognize the loop of related products
- Edit category output
- Easiest way to show total number of subpages
- Different background-image by category
- Output 2 items within the Loop
- Woocommerce – remove product from category
- Get category name from custom loop and echo it once
- Custom excerpt function re-factoring
- How can I show the post thumbnail from the most recent of a certain post type, in widget?
- hover image appears below placeholder instead of overlayed
- get current product name in functions.php
- ACF page while loop breaks footer while loop
- Split loop into two columns, how to favor one side over the other
- Dynamic Stylesheet loads but doesn’t finish
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- How to show single category archive
- How to pick the default selected value in wordpress dropdown?
- Displaying Woocommerce Product Category in WordPress
- Increase offset while looping
- Hide subcategories (widget)
- remove post that has no content
- How to show only subcategories in parent category not parent category?
- Get post id within comments loop
- Syntax error when I try to insert my loop into an unordered list? [closed]
- Custom Pagination is Broken
- How to overwrite orderby with add_query_var
- Get latest post from all categories except one
- get_the_ID() in the footer returns wrong value
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- In WordPress, how do I get the number of posts next to single_cat_title(”); in the category.php file?
- Custom post type category not displaying category ID
- WP_Query multiple post results
- Convert Featured products loop into Recent products loop?
- Posts are not looping through correctly
- Limit tags shown in post
- Create Div Wrapper On 3rd Iteration Or When Query Loop Items Run Out
- Php code error in wordpress if else statements [closed]
- Add class to every other posts using get_posts
- Get the list of post categories
- Wp Query : Order by distance lat,lon
- Remove Custom Post Category In WordPress Slug Using .Htaccess
- How to Add a cutsom slug to my custom author role
- Give ID to divs inside the loop
- Get main parent category for post (WordPress/Advanced Custom Fields)
- Display articles with a different template in the home page | Solved |
- How to output the taxonomies that are assigned to each custom post?
- Category Page Displaying all Pages
- Looping through dummy posts and showing them in the main index.php
- Link to index.php from home.php?
- Custom Loop.php having a loop inside a loop
- ACF – Get ID of relationship field in flexible content
- Hide a specific category title from displaying on site
- WordPress Ajax filter: Create two loops for different output styles?
- How to display sticky post always at the top (before regular post) in wordpress?
- How to count posts posts if they are in a separate content page?
- Thumbnail wouldn’t scale to size properly
- Populate Posts based on category selected using AJAX that means without page refresh
- random woocommerce categories are not showing when count enabled?
- How to sort (orderby) a query done by a template function before the ‘foreach’ loop?
- How to Retrieve All Category Images on Front-End
- Add div after every 4 posts then every 2 posts for a responsive loop
- Retrieving specific images from Media Library
- Add post class in custom loop (WP_QUERY)
- Custom Taxonomy Link Text Echo Name Not Slug
- Adding unique marketing messages between certain products whilst using isotope/Infinite Scroll
- Is there a way to randomize and connect a background and header image?
- why is this content-template not showing any of my blog-entries?
- the_post_thumbnail unless video id is added
- dynamically filter by category via sub-menu
- Get unique post in parent category
- Incomplete term slugs output from a foreach loop with get_the_terms
- WordPress post pagination on custom template not working
- Implement “No related posts for this entry” into the loop?
- Options.php loop won’t show!
- How to insert the first letter in uppercase [closed]
- How to get posts by a certain author in inner loop using outer loop variable or post title WordPress