The term_link
filter has a different signature for its callback function than the page_link
filter, meaning the arguments in your callback are different. (Also note you’ll need to explicitly set the argument number when you call add_filter
because by default add_filter
will only setup 1 argument. For example:
add_filter( 'term_link', 'lqd_series_link', 10, 3 ); // Where 3 is the number of arguments for your callback function
Then in your callback:
function lqd_series_link( $url, $term, $taxonomy ) {
global $wp_query;
if ( $taxonomy == 'gc-sermon-series' && isset( $wp_query->query_vars['app-view'] ) ) {
return $url . 'app-view/';
}
return $url;
}
Related Posts:
- How to display term description in empty terms archive?
- Query posts using custom taxonomy and selected terms
- Build filter for post-type + multi taxonomies + multi terms
- URL rewriting taxonomy term
- Include get_term_link inside search
- How to paginate with an query var appended to permalink?
- get_the_term_list without links in 3.1
- get_term_children for immediate children only (not grandchildren)
- Is there a way to ‘Lock’ a Taxonomy?
- Creating a non-removable taxonomy term
- Return only the custom sub-term for custom post type, do not echo term-parent
- wp_insert_term is adding a term that has no name
- Get terms from multiple taxonomies
- get_terms showing link to category even if all posts are drafts
- Determine if Term has Grandparent/Great-Grandparent
- Nice URLs for a Custom Post Type List with a Shared Custom Taxonomy?
- Retrieving custom taxonomy in order, but excluding specific tax IDs
- Get main parent categories for a product
- get taxonomy terms for parent and child
- Taxonomy query for children of parents
- Separator for multiple terms
- Removing the base “Author” or changing it to something else. is it possible?
- Filtering more than one term in a taxonomy in WP
- Ordering Posts with Custom Taxonomy Terms Array
- Checking if a Page has an Associated Term?
- What are terms and taxonomy, how they related to post and how these three are stored in database?
- Get multiple term objects by ids
- Echo custom taxonomy term name
- How to handle “the_terms” inside loop
- How to create drop down for child categories of current taxonomy being viewed?
- How to dynamically add custom taxonomy terms as a sub-menu of an existing menu item, using custom walker class
- Get terms ordered by post date
- Why does WP rename similar “term name”-slugs in separate taxonomies?
- Get Bottom Most Level Taxonomy Terms?
- How can I get WP to build a feed based on multiple taxonomy terms
- Set custom post type terms by id without knowing taxonomy
- Display hierarchical subterms of custom taxonomy based on depth
- How to determine the depth of a term in a custom taxonomy?
- get_term_children doesn’t return an array of children terms
- Term count by user
- AJAX response, edit tags
- List child terms if parent but show nothing on children
- Display Taxonomy Terms in an option tag with value being the slug
- If post has ANY term attached to it, get the first one only
- Getting Term ID from Term Name for WordPress Query
- Displaying custom taxonomy in the admin list of a custom post type
- Custom permalinks with hierarchical taxonomy – getting PHP warning
- Sort order by slug for looped child terms of custom taxonomy
- Simple Filter between multiple taxonomys
- wp_insert_term created and set for first once only
- Add Taxonomy Subcategory To Permalink
- Updating / Saving items generated by wp_terms_checklist on frontend
- Rewrite rules for varying nested terms of custom taxonomy
- How to rename custom taxonomy URL with extra words
- Count Number of Posts in Taxonomy Term in Last 24 Hours
- Query custom taxonomy by term id?
- Filter Custom Taxonomy Posts
- Update table wp_term_taxonomy.count after INSERT INTO via SQL
- How can I reduce amount of ifs and else ifs in this specific block of code?
- Are term IDs unique even between multiple custom taxonomies
- What is the action hook that deletes a taxonomy term from the backend? And how to retireve the term id before deleting it?
- Get all attachments by custom taxonomy – term
- Get terms that don’t belong to current post with a shortcode
- How to get posts that contain multiple terms from multiple taxonomies?
- Cannot delete or edit a single term in a custom taxonomy, taxonomy name is wrong?
- How best to store data (URLs and IDs) extracted from posts and pages using custom taxonomies
- Clean Custom URL for Serach + Custom Taxonomy
- Advanced search redirecting to another page then filter further
- Get name of taxonomies of current page
- export and import taxonomy terms from one taxonomy to another
- save custom term – hook create_term doesn’t work
- Find terms in a custom taxonomy based on the hirearchy
- Wp_query…a type of term a different div
- Show all terms in a custom taxonomy with all child terms wrapped in a ul
- Show single Child Category on Custom Post
- Unable to get the Parent Custom Taxonomy Terms
- Unsetting post_tag taxonomy breaks term description for other taxonomies
- Pull data from MySQL and add it to terms
- Taxonomy URL rewrite whilst keeping filtered posts?
- Get custom taxonomy terms that contain posts that have another taxonomy term
- How to structure all custom-taxonomy with three verbs(a,b,c) and route them accordingly?
- wp_insert_post not adding taxonomy (using wp_set_object_terms)
- Filter “get_terms” query
- use apply_filters return taxonomies custom post type
- generate random slug when adding taxonomy
- Custom post type term names with ampersand in the term name
- Need help understanding a rewrite with multi-level taxonomy
- If page is a taxonomy do X, if is a term, do Y
- Query pages by child term
- Getting the parent terms adds additional empty markup [closed]
- Custom taxonomy list in two columns
- Taxonomy term breadcrumb; how?
- Insert term description programmatically into hierarchical custom taxonomy
- get multiple values from $_GET from multiple checkboxes
- Get post terms with hierarchical relationships
- Custom Taxonomy Archive URL rewrite
- Unable to display the post titles in a drop down
- Taxonomy archive link from term id
- How can I get the term_id from the action hook ‘set_object_terms’?
- How do I check if a post has a term with a particular ancestor/parent?