The filter you are looking for is term_links-$taxonomy
, where $taxonomy
is the taxonomy name. This will filter the $term_links
links array before outputting by the_terms()
:
add_filter('term_links-cities', 'ad_filter_links');
function ad_filter_links($term_links) {
foreach ($term_links as $term_link) {
$term_link = str_replace('<a ', '<a class="fancybox"', $term_link);
}
return $term_links;
}
Related Posts:
- Permalink with sub-sub-category and post name
- Custom Taxonomy in Permalink of Post
- Include Taxonomy slug in post url
- Remove Custom Taxonomy Slug from Permalink
- Custom taxonomy rewrite using tax name instead of rewrite slug
- Redirect parent taxonomy to it’s child
- Possible to remove taxonomy from permalink if uncategorized?
- Dynamic Template file for subpage
- wordpress custom post type taxonomy permalink
- How to generate a list of all urls
- Remove Parents From Permalink of Hierarchical Taxonomy
- archive by year and category: permalink support doesn’t work on pagination
- How to separate an overgrown blog into sub-blogs – without breaking existing inbound links?
- Why does page for hierarchical taxonomy parent term go 404?
- Added .html to Woocommerce permalink but pagination don’t work!
- “Undefined” added to page content after google Adwords click
- WordPress Permalink Problem
- Using a taxonomy value as part of a post URL
- Incorporate single WordPress page into an existing static website [duplicate]
- Getting the terms from “Beautiful Taxonomy Filters” Results ot Integrate into “Ajax Load More”
- Not recognizing my custom templates in hierarchy
- ‘Unsupported Operand Types’ error stemming from taxonomy re-writes with PHP 8.1
- Need help with add_rewrite_rule
- Get current URL (permalink) without /page/{pagenum}/
- How to get pretty URLs with add_query_arg in permalinks
- How does wordpress keep track of post id when post id is not used in permalinks?
- Permalinks to Custom does not work (out of box)
- Multi-language permalink in qtranslate
- How to add query parameters to all internal links?
- How to make draft posts or posts in review accessible via full url / slug?
- Social Media Links on homepage – within posts/post loop
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- Custom Post Type: How to display all of same taxonomy?
- How to change the link structure of the homepage?
- WordPress on VirtualBox – no pretty permalinks
- Does WordPress send a 301 header message when you change permalink structures?
- Remove the Parent category from the permalink but leave the child category
- shortcode to output multiple images urls from media library id
- Multilanguage URLs
- Trying to get property of non-object when using get_post_permalink()
- I copied my site to another site but all links point to old site
- Attachment Page Permalink/URL Rewrite Issue. How to change the actual rewriting?
- How to protect htaccess so it can’t be overwritten?
- How to link to current post in WordPress?
- 301 Redirects Result in 404 for WordPress Search Query Strings
- After updating to 4.8 permalinks will not work (all 404)
- Editing URL character replacement
- How to make /search/ without parameters not return a 404?
- Get post text (by its URL) from database dump
- WordPress archive permalink with leaf category
- All top-level pages are using index.php as template
- Redirect all posts permalinks from “.html” to “/”
- Nginx url rewrite rule problem
- How to rename ‘Tag Base’ with WPeC 3.8?
- Custom rewrite rule ignored
- Stop Images Linking to Themselves?
- Make last three words of excerpt a link
- Resolve 404 on posts without category
- Retrieve default permalink while using seo friendly URLs in WordPress
- Inserting a string in the middle of page’s permalink?
- When I click on a single post my browser goes to about:blank#blocked and the page is white
- WordPress Permalinks problem
- Pagination using paginate_links
- Access or edit custom generated permalinks with WP_Rewrite
- Add custom query vars to pretty permalinks
- xammp server permalink by postname not working
- Redirect after permalink changes
- Using page title as a link to term archive
- How to define %category% for custom taxonomies?
- Permalinks and page store
- All in One Seo and Permalinks
- Change pemalink for one single post without redirect
- Add .html permalink to post if specific category
- Strip subcategory base from URL
- rewrite based slug standar post wp
- How to update wordpress permalink structure with author role?
- How to turn a custom query string into permalink?
- Edit Post Permalink option removed, looking for possible causes
- Site Tagline ended up in permalink
- Custom structure permalink preventing 404
- URL issue after setting up Custom Structure in Settings >> Permalinks
- Add slug to default post permalinks ONLY
- Getting 400 Bad request Error when trying to open posts after updating to wordpress 5.0
- Category Base permalinks
- Propper way to set anchor and url param
- Pretty Filter URL
- Add URL to selected post in meta box
- How to change dynamic link to relevant post
- Auto-generated pretty permalink not using title since 4.4 update
- Problems with permalinks after update wordpress 4.2
- Prevent guessing slug
- Pretty permalinks to work for lighttpd webserver?
- Custom Post Type Categories Not Maintaining URL structure any more
- Customize category permalinks
- broken permalinks in responsive layout
- permalinks url with woocommerce
- How to get the perfect WordPress, WooCommerce, Custom Post Type pretty permalinks?
- Custom Permalink Structure For a Specific Category
- Error: “Sorry, this content could not be embedded” when using the Embed block
- WordPress not remembering old slugs for pages