Hi there @degorych , thank you for reaching out with your topic. You can embed selected stories using something like:
[web_stories title="true" excerpt="false" author="false" date="false" archive_link="false" circle_size="150" sharp_corners="false" image_alignment="right" number_of_columns="1" number_of_stories="2" view="carousel" selected_stories="1001,979/]
You’ll want to change the selected_stories=”” values to your story IDs. To find your story ID:
- go to Stories Dashboard > click into the story
- Preview the story from the Editor
- In the URL, you will see something like
preview_id=979
- Another option is to view your story, then in the developer tools, view page source and search for
v1/web-story/ which will give you the story ID
Hope this helps.
Hi @luckynasan . This is not working for me https://prnt.sc/Jc7qaE0bynKW . I don’t find any logic for this into plugin (shortcode section and story query section). I’m afraid that it is not working for shortcodes.
My test code:
$rows = get_field('web_stories_repeater');
if ($rows) {
$ids = array_map(function ($row) {
return $row['story'];
}, $rows);
$webStoryShortcode = '[web_stories view="carousel" number_of_stories="2" selected_stories="' . implode(', ', $ids) . '"]';
var_dump($webStoryShortcode); // [web_stories view="carousel" number_of_stories="2" selected_stories="4616,4610"]
echo do_shortcode($webStoryShortcode);
}