get_query_var( 'tag' )
will return you 'tag1+tag2+tag3'
string.
get_query_var( 'tag_slug__and' )
will return you the array of tags.
So, there are two ways to achieve the goal:
$args = array(
'tag' => get_query_var( 'tag' ), // string
);
or
$args = array(
'tag__and' => get_query_var( 'tag_slug__and' ), // array
);
It remains to be seen how do you plan to create tag1+tag2+tag3
slug.
Related Posts:
- WordPress Tags in class
- Get post by page name or slug
- Exclude category by slug for for each loop
- Related Posts loop – offset
- Get titles of all posts with current tags except current post
- taxonomy tags 404 to custom post types
- A loop with all articles with certain text strings in tags
- Problem getting current post tags to show in a widget
- How to show more random posts if Tag has less than 3 posts
- Exclude page name from loop
- Display Posts Only with Specific Tag
- how to replace get_template_part(‘loop’,’tag’) with explicit styled version?
- For each loop on every word in post
- Tags on page (not post) returns nothing – why? Improved clarified question!
- Include future posts in tags and in search
- Getting page slug
- Why doesn’t ‘continue’ work in page?
- how to run loop in function.php that sends email based on specific conditions?
- Using has_tag() outside loop
- Show posts by tags excluding current post
- Secondary loop cuts off at 10 posts?
- How to show only specific tag in wordpress loop
- Tag custom loop show posts
- get_page() unlike Loop returns the post content without html tags. How can I fix this?
- How to do query_posts on tags pages
- Tags outside the loop
- Counting the posts of a custom WordPress loop (WP_Query)?
- How to split a loop into multiple columns
- Is it necessary to reset the query after using get_posts()?
- Is there any difference between the_title() and echo get_the_title()?
- Pagination not working on home page
- save_post + insert_post = infinite loop
- Get ID of a page containing secondary loop in content
- is_home, and is_front_page conditional problem
- Is `query_posts` really slower than secondary query?
- ACF Repeater loops and resets – where is the reset_rows() documentation? [closed]
- Filter query_posts by tag slug on “Tag Archive” page (when tag is 2 or more words)
- WordPress Loop Through Particular Pages
- Display date only once for a each set of posts relating to that date
- Load comments per post on click with AJAX
- The main Loop is not starting in a custom blog template page
- connect last post with first post
- Chopping up a large ajax request of around 200 posts [closed]
- Combining the_excerpt with the_content
- Custom loop with conditional statement to separate each terms
- Breaking the loop?
- How to get an array of years from all of the search results, and use it to filter by year the paginated loop?
- woocommerce stored variable
- Get search.php results in header.php?
- A smarter way to display multiple loops inside a page template
- Exclude posts from main loop based on meta value
- trouble calling an import class from an action in a plugin before wp_cron executes
- How can I paginate this?
- Obtain page data and use regular loop
- How can I load posts starting from, and including, the current post?
- How to fix pagination for custom loops?
- ‘Auto Draft’ Post showing in wordpress loop
- How do I display an image before the first post of the loop when I’m using get_template_part?
- How to get a post’s content? [closed]
- Multiple get_posts() queries on one page
- Change date format
- How to stop the continuation of posts on the second loop from where the first ended
- In Custom page – next_posts_link Not working while previous_posts_link is working
- Escape current post from loop
- Why isn’t my multiple loops working?
- How do I display the latest posts from three different categories?
- Extracting relevant tags associated with that particular single post only
- Why the first with flexslider appears as blank on my code?
- Rendering pages
- How can have a conditional template tag based on the main loop within a secondary loop with new WP_Query(), using get_template_part()
- Reset Loop get_posts();
- WP_Query is only looping home page, not pages
- How to filter posts by category INSIDE the loop
- Offset Loop by 1 , Limit next loop to 1 (Most Recent) Post
- How to show multiple attachements together with Scribu’s Posts 2 Posts connector?
- Script that gets the first tag of post and query all other posts with the same tag
- Custom Header added within Dashboard pages, is this possible with custom template files?
- Loop order issue with Ajax filter
- Adding a second loop breaks everything
- Need to while loop and display contents in the subfield of a group field given by ACF
- Custom Query with Sticky Posts
- How to display a loop of custom post types in columns
- is it bad to copy the loop for a template?
- WordPress Modal showing posts not working properly
- Query posts and display all dates in repeater field in chronological order
- Return only one post format in index.php [duplicate]
- Multiple loops in set intervals with code in between
- Modify widget to output posts in custom order
- How to execute custom loop before loop content?
- Limit article to 100 characters. Can’t use the_excerpt…
- Return only content in excerpt field in loop
- This webpage has a redirect loop issue with SSL page
- Buddypress Group Activity Loop Filter activity type [closed]
- get_posts and wp_autop (remove filter)
- Trouble preventing duplicate posts between 2 loops on homepage
- $do_not_duplicate is not working in genesis theme
- Loop displays current page
- How to get files from loop for zip
- Divide loop into several columns based on post custom field and enable infinite scrolling
- Query Loop Block: possible to restrict just child pages?