, not nested inside .entry-content or any other * themed wrapper. Themes commonly apply a CSS property (transform, filter, * will-change, contain) to content wrappers for unrelated reasons, and any * of those create a new "containing block" for position:fixed descendants — * which silently caps the bar's width/position to that ancestor instead of * the viewport. Rendering from wp_footer sidesteps the problem entirely * rather than trying to out-CSS every theme's wrapper styling. * * @var array $attributes Block attributes (color, height, position). */ if ( ! defined( 'ABSPATH' ) ) { exit; } $color = isset( $attributes['color'] ) ? sanitize_hex_color( $attributes['color'] ) : '#2271b1'; $color = $color ? $color : '#2271b1'; $height = isset( $attributes['height'] ) ? absint( $attributes['height'] ) : 4; $position = isset( $attributes['position'] ) && 'bottom' === $attributes['position'] ? 'bottom' : 'top'; awp_queue_reading_progress_bar( array( 'color' => $color, 'height' => $height, 'position' => $position, ) );