I think you are looking for get_query_var
$term_slug = get_query_var( 'term' );
$taxonomyName = get_query_var( 'taxonomy' );
$current_term = get_term_by( 'slug', $term_slug, $taxonomyName );
Related Posts:
- How does WordPress generate URL slugs?
- Add menu and submenu in admin with a URL instead of slug?
- Best way of removing emoji support from url / slug only
- Allow UTF-8 characters in the user slug part of URL
- Why ids in urls don’t work but slugs do?
- Easiest way to simulate WordPress’s URL resolution to retrieve post ID, etc?
- pass user id in slug and get user information
- wp_insert_post – How do I prevent incremental numbers on child pages?
- How do I link to a blog not set as the homepage?
- Allow Chinese character on post URL slug
- How to edit URL Slug?
- How can I change a media attachment URL/slug, so that I can use that slug for a page?
- Can anybody provide me with a function to generate slugs?
- Site transferred to new server produces 404s
- Thousands of unwanted URLs/pages with “0” in slug created
- Too many redirects (ERR_TOO_MANY_REDIRECTS) only on one page
- How to remove % character from url
- Can non-latin characters appear in slugs?
- Allow duplicate slugs for pages and posts
- Avoiding the -2 in slugs
- mysterious issue with stop words in urls not working – how can I restore multiple url access?
- How to create URL for Pages/Posts
- Modify WordPress to not replace + (plus) characters from URLs?
- How do you retrieve a post by slug name through REST API?
- How does routing on wordpress work?
- Redirecting to old domain after migration
- Unwanted media library URLs in posts?
- How to remove file versions from the file source links in wp_head?
- Update media file url in wordpress media library
- How to create non-unique sub-category slugs?
- Limiting the number of words or characters in the slug/permalink
- Dynamic URL generates dynamic content
- Pages redirected to attachment post
- permalink for category pages and posts
- WordPress converting ../url to http://../url
- Password protected page Hash url
- Which of WordPress’s .php files need to be directly accessible via HTTP?
- home_url(); showing current page instead of site address
- How do I override the emoji url?
- Site broken after using URL Change in Admin
- Custom Post type permalink structure with custom_post_id
- Setting a url for a page
- Imported thumbnails have incorrect URL
- Adding special characters to slug?
- What is the correct way to convert the absolute path of the executing script to a URL, in WordPress?
- 404 error when passing “cat” parameter to URL
- Is it possible to configure WordPress’s Core Files to accept duplicate Child Categories?
- how to trace a file by the route url
- wordpress.com website url structure [closed]
- Block direct url enter
- How do you make homepage redirect to it’s slashed version?
- Can i have access to my WordPress Website again?
- How can I make my blog urls have words of the title in them?
- Suddenly new posts have the default permalink instead of the post name
- Website Address Keep redirect to website after migration attempt
- Change URLs depending on alias
- Passing values through url for checkbox fields with same name to get?
- How do I avoid messing up URLs when switching from example.com/subdir to example.com?
- Made WordPress URL and site address URL the same
- How can i get rid of wp in front of URL
- Alternatives to site_url() and get_template_directory_uri()
- Blog post – single.php url
- Unicode characters are saved in a funny way in the DB
- Replace category name with article id in wordpress urls
- Redirect Old wordpress url to new wordpress url
- WordPress Primary Category Changes After Import, Permalink Issue
- Make unique url to unlock a post
- Make the home page’s slug visible in the browser’s URL bar
- How do I structure my permalinks in WordPress?
- How to set wordpress url on local host to access it via VPN
- How to remove category name for only one category?
- unique url access control
- I found weird email address appended to some of my URLs, what does that mean?
- How to get custom URL routes property_id in wp php plugin?
- index.php shows up in url
- Why my WordPress website homepage automatically adding cs_preview=true query parameter to the url?
- how to remove this #.XsZOUWhKjIU from my wordpress url
- Rewrite rule not working, but only when parameter is text
- Swap out a page that is a parent to a many many pages
- How to assign a default/priority taxonomy to be shown in url in case two taxonomy items are selected
- Cannot Save Changes After Updating URL Settings
- How to encode correclty an url with the char “&” for an email?
- How do i create navigation links like this in wordpress? [closed]
- Blog post Links leading to home page [closed]
- Custome home page url
- Change the full slug for a specific category?
- Let WordPress to go opening an external URL
- Change default query parameters
- Plugins and how to assign urls to content
- problem getting audio url
- wp-login.php ampersand in url results in 404
- How to eliminate the Web Address / Web Link textbox from comment forms
- URL displays different page (a loop)?
- Change path/url of admin-bar.min.css
- Why is my WordPress install using full server directory paths for media URLs?
- Accidentally Changed WordPress Url
- Typing local WordPress URL works, but clicking the same link does not
- 404 error on cyrillic url
- Block a specific url request
- What purpose does /embed/ URL have and how to avoid SEO problems?