Skip to content

Missing css/js on custom theme frontpage #1337

@joey-kwl

Description

@joey-kwl

Description:

I'm loading a page with get_post() combined with apply_filters() into my frontpage of a custom theme, but when I load Otter's slider block all of the images are underneath eachother.

How to reproduce:

  1. Make page with a slider from Otter
  2. Load page in frontpage with get_post

Expected behaviour:

A slider like in the gutenberg

Current behaviour:

All of the images are shown underneath eachother

Reference:

Technical info

  • WordPress version: 6.1.1
  • Plugin version: 2.1.3

I tried adding this to my frontpage (index.php):

use ThemeIsle\GutenbergBlocks\CSS as OtterBlockCSS;
$css = new OtterBlockCSS\Block_Frontend();
$css->enqueue_styles("18", true)

Found here: https://wordpress.org/support/topic/otter-block-styles-on-other-page/
but enqueue_styles return NULL

Edit:
It seems like it went inside this part of class-block-frontend.php:

if ( ! has_blocks( $post_id ) ) {
	return;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions