Untested, but here is a solution from Konstantin Kovshenin
global $wp;
$current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
You can then just simply echo $current_url
Related Posts:
- Get rid of WordPress category, tag and author archives?
- How to add the category ID to admin page
- How to create a widgetized sidebar for every category dynamically?
- Only show category to certain user levels without plugin
- List Categories of the Parent Category of the Current Category
- exclude category from WordPress Form function
- wp_list_categories, Add class to all list items with children
- Remove “Parent” Selection When Adding/Editing Categories?
- Check is category parent or not from its ID
- How to show in search results posts with a particular tag in a particular category?
- How can I get an tag to wrap each ancestor that gets outputted in this condition?
- If category is in parent category?
- If in category to be inside of a function
- Rename Default Category (Uncategorized) Via a Function
- Check child/parent categories if exists
- How to show only one category in breadcrumb navigation
- Query posts from category based on a filter most favorited
- Add tag parameter to category.php
- Random Featured Image Based on Category
- add slug beside name in Admin Category Checklists
- Change div background acording to the selected category
- How to use wp_list_categories with plugin category?
- Redirect depending on category chosen
- How to add icon over specific thumb
- How to load several hierarchical categories from functions.php
- Change Default Content when Creating a Post based on Previous Category Choice
- How to add a custom thumbnail size for a specific category?
- create function to call category name and slug
- Different size video display for category page (smaller) & detail page (larger)
- Code to display category-specific single.php is overriding normal single.php, too
- Loop Through Categories in Custom Field
- Function to list posts from current post’s category fails in WP 3.8
- Show only one category in main query, issues on tag page
- Show parent-child relationship for categories in the wordpress admin
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Make parent categories not selectable
- Reflect nested categories in appearance > menus
- How to Override default update_count_callback for category
- Order Taxonomy Term by date created
- Let visitors post comments on category page
- category_description() shows raw html after version 3.x?
- Make parent category not selectable when it has child categories
- Can I use get_adjacent_post for specific categories?
- How to Filter categories in the permalink structure
- Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#
- products nested by subcategories in a current category archive
- get_the_category() always returns empty array
- Post count for category and tag
- Get current_parent_category in a loop or Cat ancestor- big problem
- Show number of articles in menu
- Can you pre-check wordpress categories?
- How do you categorize pages?
- List Sub-Categories of a Parent Category
- add text to the top of category page
- If statement for catergories
- Rewrite a category
- Order of subcategories
- “Categories” for six authors [closed]
- WordPress/Woocommerce only show category in shop to a single role
- Category control subcategories
- display posts from specific category on a page , in thematic child theme?
- Latest comments from each category?
- custom post type category link redirects to index
- Categorie parents and childs displayed
- Display random categories
- Link To Child Category For A Post
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- How can i change what one category displays?
- How do I change the category permalink structure?
- How to remove the tilte “category:category name”?
- How to display post in custom file not in archive file?
- why category__and and category__in wont work togather?
- Display ACF category image on archive and single template files
- Setting the Primary Category for a Post Based on Context
- Show the number of the post
- Automatically adding tags and categories into Post Excerpt for searching
- Allow Custom Role to edit a custom post type category
- How to prevent tag “iframe” from being deleted from the heading description of rubric?
- When creating a new product, auto assign it to all custom taxonomy woocommerce
- How do I merge WooCommerce categories with the same name?
- Custom get_the_password_form
- How can I make a category function as a page?
- How to add custom option to wp_dropdown_categories?
- How to hide/remove featured images in particular categories post?
- Create duplicate category page with content variations
- Renaming default category taxonomy?
- Profiling user with categories
- Category names dependent on each other?
- Hide category name in URL
- Backend – Categories and Menus conflicts
- Highlight posts that belong to current sub category
- How to add an empty entry to masonry?
- Own Custom Tags/Category page ( posts)
- How to display many photo albums related to category
- Modify functions.php to add a term ‘uses-theme’ set to theme name on post save
- Create custom Perma link
- Add product category to post_class
- Moving Blog and Changing URL
- Custom EndPoint not working when strip child category in URL
- How to add custom prefix before category base for category page URL?