$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 fix pagination for custom loops?
- Jquery Slider for profile template
- Counting the posts of a custom WordPress loop (WP_Query)?
- if ( is_home() && ! is_front_page() )
- Get excerpt using get_the_excerpt outside a loop
- How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
- Get post content from outside the loop
- Why should I put if(have_posts()), is while(have_posts()) not enough?
- Display featured products through custom loop in woocommerce on template page
- Split Content and Gallery
- Get the children of the parent category
- How to get Author ID outside the loop
- How can i display the content in plaintext
- How to check if I’m on the last page of posts?
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- How to split a loop into multiple columns
- Is it necessary to reset the query after using get_posts()?
- Is there any difference between the_title() and echo get_the_title()?
- AJAX with loop filtering categories
- Do I need to use The Loop on pages?
- Remove the Homepage Query
- remove tags from the_content
- the_title() shows title of the first post instead of the page title?
- How to force excerpts / teasers in the loop
- Retrieve each widget separately from a sidebar
- Why am I being limited to ten posts on a custom loop?
- exclude category from get_posts?
- Should category.php and The Loop be used if the query needs to be customizable?
- Should I use loop in the single.php file?
- Inject post (from specific category) between posts in Loop
- A search for ‘0’ returns results
- Why do themes rely on “The Loop”?
- How do I get the category URL from get_the_category?
- Display all posts from specific categories on a page
- How to return loop contents
- Using the Loop to show all levels of subpages under a parent page? Halfway there
- Cleanest Way to Select Every Second Element in a Loop?
- How to show list of posts by author and category?
- Insert image or ad script after 3 posts using the loop
- Get date of last update outside of loop
- Pagination not working on home page
- Child Pages Loop
- How to place comments_template(); outside the loop?
- Multiple Loops Homepage?
- Exclude certain category from latest updates
- How to Change Loop to Order Posts by Views (using wp-postviews plugin)
- get_field not displaying my custom field value
- how to upload image using wp_handle_upload
- Avoiding using a loop to access a single post
- Default WP Gallery – show only galleries of a certain category
- How to get the first image gallery of a product in woocommerce in a loop
- Exclude categories from Loop, queries, widgets, post navigation
- Get post by page name or slug
- save_post + insert_post = infinite loop
- Rearranging posts based on categories
- WP_Query not looking at child category
- Loop.php vs looping inside template file
- Get ID of a page containing secondary loop in content
- Randomise results from a category page?
- Custom Loop and Infinite Scroll
- Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
- is_home, and is_front_page conditional problem
- Is `query_posts` really slower than secondary query?
- Display all posts in category, with specific tag posts at top
- Are there any scenarios where the query_posts may be used?
- the_content and wp_link_pages
- Show div only if post is in specific category
- List posts by category exclude current post
- wp_list_categories exclude not working
- Adding ‘current_post_item’ class to current post in the loop
- How do I get the attributes of a short code from a post?