• Resolved Shilpa Manoj

    (@shilpamanoj)


    I have added this shortcode in the front-page.php file.
    [web_stories view=”carousel” sharp_corners=”false” number_of_stories=12 date=”true”]

    This shortcode is working well in the gutenberg editor. But it is not working in the front-page.php file. Displaying it as blank with no content.

Viewing 6 replies - 1 through 6 (of 6 total)
  • @shilpamanoj Hello there, thanks for reaching out. Could you please share the affected story URL so we can take a look?

    Thread Starter Shilpa Manoj

    (@shilpamanoj)

    Hi @luckynasan, This is the affected site URL :
    https://staging.taxscan.in/
    I am trying to display the latest 4 stories in the homepage of the site.
    For that I have added the code
    do_shortcode(‘[web_stories view=”carousel” number_of_columns=4 sharp_corners=”false” number_of_stories=12 date=”true”]’);
    in the front-page.php file.
    None of the stories are getting displayed in the homepage and you can see a blank area under the webstories heading.

    @shilpamanoj For a box carousel try configuring this shortcode generated by the dedicated Web Stories button in the classic editor:

    [web_stories title="true" excerpt="false" author="false" date="false" archive_link="true" archive_link_label="" circle_size="150" sharp_corners="false" image_alignment="left" number_of_columns="1" number_of_stories="4" order="DESC" orderby="post_title" view="carousel" /]

    Thread Starter Shilpa Manoj

    (@shilpamanoj)

    @luckynasan Tried this shortcode, now latest 4 stories are displaying in the frontend but carousel is missing. We need a carousel of the latest 4 stories.

    @shilpamanoj For the carousel glider to display, you will need to change the number of stories value to something greater than 4 stories.

    Since there hasn’t been any further response, this topic will be marked as resolved. Please feel free to create a new topic for any new issues. Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Web Stories Shortcode not working in the .php file’ is closed to new replies.