With get_terms()
, the exclude
parameter takes an array of term IDs, so just add the second term to the array:
$terms = get_terms( TribeEvents::TAXONOMY, array(
'orderby' => 'name',
'order' => 'ASC',
'exclude' => array( 77, 71 ),
) );
echo '<li>Category:</li>';
foreach ( $terms as $term ) {
echo '<li><a href="'.$url.'?tribe_eventcategory='.$term->term_taxonomy_id.'">'.$term->name.'</a></li>';
}
Related Posts:
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- Allow authors to post only in categories they create in WordPress
- Add custom field to attachments in a specific category
- How to Populate the list of custom post type categories
- Php string not working in WordPress Functions.php [duplicate]
- Problems with function on function.php
- Use template for posts with a particular category grandparent
- Check if Product is in a Specific Category in Functions.php
- Woocommerce – remove product from category
- get current product name in functions.php
- get post based on category chosen in drop down – The ajax method
- Swapping wp_dropdown_categories function with wp_category_checklist
- Pass Category Name, Description and Photo into variables to pass to jQuery
- How to pick the default selected value in wordpress dropdown?
- Get page that displays all children of taxonomy parent
- Dilemma of Populating all the categories in a drop down list
- Edit the_category (); for a hierarchical display
- Displaying posts based on category
- How to get current post category details inside “loop”?
- Show all tags within a category?
- Post not populating for custom post type based on category selection
- Dropdown category field inside repeatable metabox
- Display Visual Composer shortcode if a post belongs in specific categories
- Get parent category name when only child category is applied to a product
- How to move a post from one category to another
- Notice: Undefined variable
- Hide a specific category title from displaying on site
- Populate Posts based on category selected using AJAX that means without page refresh
- All categories options or All categories not Populating
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- PHP get_category() function redeclared
- Get category id for a custom category and display it in a class
- Trying to see if page is category or single and displaying title with appropriate heading tag
- Displaying categories
- How to insert the first letter in uppercase [closed]
- Hide child of parent categories already hidden with “get_terms_args” – Woocommerce
- Exclude a category ID from the following function
- How to override an unpluggable parent theme function?
- Change the footer text on the login page
- Can i check if user is doing any ajax request?
- Displaying post per day
- Rewriting search and pagination base
- Copyright info change in Theme Child PHP
- Understanding WordPress child theme custom JS loading
- Problem with ACF shortcode with Repeater Field in WordPress? [closed]
- Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions
- Insert After Second Paragraph Without Tag?
- User Defined order on get_categories?
- Is the regular ajax request method safe or I should use admin-ajax.php?
- Using wp_get_image_editor in a standalone script
- page template for attachement page?
- PHP Deprecated: WP_RSSjb has a deprecated constructor
- Removing unneccessary p-tags (Not every p)
- Set WordPress Default Template
- Can’t get page content in WordPress
- Showing content from one page on another
- How to insert a single row to WP database table?
- Get date numerical and separate?
- How to add seperate classes to no-search-result and found-search-result pages on wordrpess search – is_search()
- How to check if a meta value has already been assigned to any user?
- A non-numeric value encountered in /wp-includes/functions.php on line 68
- How to call plugin function per site in a multisite?
- Ajax load more button for comments wordpress
- Unique icons next to each WordPress menu item
- How to set the WordPress logo programmatically with PHP
- Function works everywhere, how to keep it to execute when creating a new post
- Add login hyperlink to secondary navigation menu
- Pagination broken on is_front_page()
- Use get() method to grab all categories and output inside another method
- Reading settings in the home page precisely home.php
- Calling function in loop causes repeat data
- Is there a hack for using is_page() within the function.php file?
- Add a select-option to the default widgets
- Programmatically revert to backup .htaccess a possibility?
- WordPress User Meta value variable into Google Gauge Chart
- Show all people who commented on all posts by an author
- Custom global variable not working in function
- Embed video from streamtape using direct link
- Is there a PHP function that will return the block ID generated by WordPress?
- Creating a Function and Call It
- get_the_author_meta( ‘ID’ ) just return 1
- Site title not showing. Please help me
- Check if post visited first time
- Store custom field’s multiple values in one user meta key
- Need to Echo A Url path to show on a wordpress page
- Theme editing “post thumbnail” help
- Restrict File Type Uploads by User on Wordress via functions.php
- How to Request a User to Register on Landing at a Site, Then Automatically Delete the Users Password on Logout?
- How to list categories by page id in wordpress
- AJAX Returning Way Too Many Posts
- Where can I find the declaration of `$_wp_theme_features`?
- redirect 301 with special character like WIX site “#!”
- How I can add div to menu?
- How to print redirected query string variables to the page?
- Admin-area broken through weird issues
- Showing Subcategory’s Name and Link Instead of Parent Category’s
- Select area and checkbox data is not saving?
- How to modify this function to exclude also the post belonging to a specific category?
- Suppress errors when using global function
- how to create twitter card without plugin in wordpress website?