$cat_ids = wp_list_pluck( $cat, 'term_id' );
Once you get the category ids as you have mentioned above, you can search for the key having the category id 68
as
$key = array_search('68', $cat_ids);
Once you get the key, you can unset/remove that from the array as
unset($cat_ids[$key]);
Once that is removed, you can use the implode function the way you are currently using.
Related Posts:
- Exclude the category from the WordPress loop
- How can I custom order the results from wp_list_categories?
- wp_list_categories: get latest featured_image of category
- Exclude category by slug for for each loop
- How to exclude categories from recent posts, recent comments & category widgets?
- Display page of custom posts?
- Showing current subcategory
- Why is my loop not dynamically grabbing the correct Category and displaying all categorized posts?
- Query Posts Exclude Entire Category
- Publish Categories for a particular Author on a given Post
- Next Posts Prev Posts for Standard post format only
- Loop Problem: Displays same set of post for all categories
- How do I remove a category from a wordpress loop>
- Exclude page from loop results
- Category ID returns as ‘0’?
- Have posts that belong to multiple categories, exclude some categories from homepage
- Three Column Loop
- Display all categories as plain text
- Exclude current post ID from loop in sidepbar.php
- loop inside a loop : search for posts in the same category
- Only Show Excerpt After First 3 Posts
- Exclude category and post from loop in custom category.php
- Displaying Category in sidebar post widget but not in the loop on home
- Show all child categories associated to post ID within loop
- Secondary loop cuts off at 10 posts?
- My custom query not detecting the correct category
- Exclude Authors based off date of last post
- Show last post from multiple categories using wp_list_categories
- loop mix my child-category and parent-category
- How to show list of posts by author and category?
- Get date of last update outside of loop
- Display all posts in category, with specific tag posts at top
- WordPress category & taxonomy loop with pagination
- Changing behavior of the loop twice in one page
- Displaying child page content of a certain parent
- Pagination adding extra posts only on page 2
- If Loop has odd number of posts on last page Custom style for last post in it
- How can I use get_permalink() outside the loop?
- Category archive page – loop through posts of certain tag (with pagination) – pre_get_posts
- Two loops by pre_get_post on same page
- How to check for specific content in comments in the loop
- Problem the_permalink
- Sort Posts By Category?
- Can’t access login screen, wp-login.php 404’s
- Why would in_category only return one post in a specific category?
- How to show subcategories using loop?
- Create static front-page with 3-5 recent posts
- How to use current_post to open a new unordered list every five posts
- Pagination for multiple loops
- Check if loop has any categories?
- Multiple Loops on category.php with pagination on last loop
- Infinite Scroll on a loop?
- “Call to a member function have_posts() on array” error on have_posts();
- How to exclude or filter password protected posts when using next_post_link() previous_post_link
- Show Posts from Single Category Not Working
- Problem with different query loops (and “main loop”) on category template page!
- Exclude category from query
- Functions.php: Exclude Category from “Blog”
- How to loop custom post_type from (a) specific category(ies)?
- Display posts of certain categories to specific user roles
- Echoing a CSS class based on category of post in a list
- Get the image src and href data from posts
- Call wp-blog-header.php header without performing a wp_query
- Display post formats differently on index.php (loop in function)
- get_terms() parent, child and grandchild
- How to output thumbnail twice in a loop
- Frontpage pagination by week
- Integrating WordPress with Your Website
- Multiple instances of Featured Image Thumbnail As A Background On Homepage
- Altering “posts_per_page” for defaut loop
- multiple values in an array for category__and does not work with WP_Query
- excerpt not showing up
- Pagination for two loops
- Announces with different formatting dependently on a number
- Override orderby to create list of users by custom meta_value
- Thumbnail Image Rounded Corners w CSS (or any other good method)
- Several loops in sidebar issues
- List page is showing 404
- Duplicated tag in loop
- Loop only shows first two posts
- Why is my archive page looping through all but one post?
- Loop two different category WP_Query
- My WordPress installation doesn’t load correct template
- Transient not working for external data
- adding tax_query to $query_string
- Custom post types not displaying per category
- Remove posts_orderby filter then add it back in
- the_title() Returns the page title instead of the post
- WP update_post_meta link loop
- Display one post on category.php: Wrong featured image
- WordPress Numeric Pagination with Query String [duplicate]
- Conditional Check in The Loop’s Parameters
- How does the JSON API work to parse incoming JSON and fetch a post based on an ID?
- How to add excerpt in loop in Twenty Eleven theme?
- How do I hide posts in a category from all listings but still allow the posts to be viewed?
- How to implement template file and the loop
- Show only posts from todays date [duplicate]
- Why did my most recent article fall behind an older one on my site?
- Hook in the loop after the first post
- Pagination only showed when no category is set in wp_query