You did not explain your question well so I am guessing quite a bit but I think you want something like this:
function post_ids_wpse() {
global $wp_query;
$ids = wp_list_pluck($wp_query->posts,'ID');
$scs="";
foreach ($ids as $id) {
$scs .= "[wp_value id='{$id}']";
}
echo do_shortcode($scs);
}
That is very crude. You should check that the various values are sane before trying to use them, for example.
The idea is to grab the main query object from the page and create shortcodes from the ID
s it contains.
Related Posts:
- Update all posts automatically when using post_meta
- Stop WordPress automatically adding tags to post content
- How to change the case of all post titles to “Title Case”
- Confirmation box when submitting post for review
- Ajax Load More Posts in Category Page
- List latest posts in WP-Admin
- Getting the Next and Previous Posts Titles in the Sidebar?
- Search & Remove Specific Shortcode From All Posts
- Change slug with custom field
- Shortcode Not displayed at the Right Place [duplicate]
- Post X of Y in single.php / sidebar.php
- Create new category upon save based on post information
- POST from jQuery to PHP
- Display all posts under child sub category in sidebar on post page?
- How To Add Perfect Apostrophe And Quotation Mark In WordPress Posts?
- Hide Post comments when displayed via WP_Query
- How to show video from specific category on sidebar?
- Function to show random posts from a category
- How can I hide the sidebar from a specific post?
- WP_Query is printing out only one post when posts_per_page is set to multiple
- UberMenu list current user’s posts as menu items
- how to set beforsend option in wordpress ajax methods
- Get latest posts from WordPress site without header, menu and sidebar
- Display post category in foreach loop with category link
- do_shortcode within post query
- WordPress Custom Fields (Checkboxes with multiple values)
- Why WP_Query(‘showposts=5’) shows only 1 post?
- Most liked page not displaying posts
- How to get rid of shortcodes in post content once and for all
- get_the_content(“more…”) returns full text
- How to make number of blog posts a custom field?
- Is there a straight-forward way to iterate over all shortcodes in a post?
- How can i display gallery shortcode output under Post text
- How to display Common posts from specific Tag & Category with Shortcode
- Can wordpress post and sidebar remain visible after scroll?
- List authors with the last post title and order by last post date
- Shortcode to display the latest news article within a page
- Redirect to another page using contact form 7? [closed]
- Display post category in foreach loop
- Shortcodes on my website stops working after theme update [closed]
- 2 dynamic sidebars registered, not showing up
- How to get ID of the page included with get_page()?
- Sidebar show posts by current category also in single post
- $wpdb returns duplicate posts
- Adding a user’s ID behind the tag ref link address
- How can I remove the first two words and shorten get_the_title()
- Shortcode with ‘year’ parameter
- Is it possible to add a shortcode below post title?
- WordPress 302 Redirect to Random Product/Post/Page
- How can I add 2 buttons with shortcode
- Why aren’t paragraphs breaking on this page?
- Adding a meta box to determine the sidebar [closed]
- Sidebar on single.php not showing up
- How to show 3 most recent/viewed posts in a special tiles on home page using wordpress?
- Dark Bar at the top of wordpress page can’t be seen?
- How to add PHP code snippet to all Post pages?
- Widget to show posts in the sidebar basing on its IDs
- How to display only one category in a custom post type?
- Display message depending on capability outside loop
- Limiting the amount of posts retrieved by the loop
- Hide content from Post Preview
- How to get the next and previous image title from attachment or gallery?
- Shortcode for tables which can include comma and linebreaks
- Conditionally exclude post from specific category on home page sidebar?
- Show 10 latest posts only from users with contributors role
- Display most recent posts in category with Twenty Ten theme widget
- Change published date and time using SQL query for page in every 5 hour
- What parameters do I need to pass to get_tags to get ALL tags for the site, when used in a post
- get category in list of posts // shortcode for custom related posts
- How can I create a ‘sub-blog’ which has its own sidebar on individual posts?
- Featured Story Shortcode not outputting content
- Function is printing twice – any suggestions?
- Contact Form 7 Shortcode not recognized inside another shortcode
- Add a url parameter to the current post and read it in a shortcode
- Single Sidebar; multiple templates! How?
- Secretly passing post ID/title etc into a shortcode form automatically to link submission to post
- I need show posts by customer (Shortcode)
- Is it possible to query a category with specified posts?
- Correcting the content width when sidebar is inactive?
- Add category attribute to custom recent post shortcode
- Shortcode for printing post titles
- Same sidebar in all posts as in the category
- Using Post ID and Page ID in same function
- How to limit the number of results for all query_posts on mysite
- Get first comment link on the post itself
- Display only posts with comments
- User driven content problems
- How can i retrive the movies, trailers, news in a single page using search
- Change the default video URL in a post to shortcode format
- Remove read more
- How do I display the next 3 posts in the sidebar?
- Insert new post for each user infinite loop error
- How *not* to show the last post on the latest posts list
- How do I add an article to specific page?
- WordPress Yoast SEO plugin Post Save/Update Issue
- If post has non-shortcode string
- Trying to create shortcode listing custom posts, but formating not being included
- Simple shortcode to check if a user has commented on a certain post
- How to use shortcode to get the second to newest post?
- Need Help With Making Full-Width Template for Blog Posts (common methods aren’t working)