Open wpsumo opened 4 years ago
Describe the bug
Wp Rock specifically look for public post types when generating criticalcss: https://github.com/wp-media/wp-rocket/blob/master/inc/classes/optimization/CSS/class-critical-css.php#L156
Set public to false for templates and blocks so WP rocket doesn't have to try to create criticalcss for something that isn't public for the website users and not in the use of criticalcss.
$args = array( 'exclude_from_search' => true, 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'show_ui' => true, 'show_in_menu' => 'ct_template', 'rewrite' => false, 'query_var' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title' ) );
Does oxygen need to have the CPTs set to public? If so WP rocket have an exclude list we should have oxygen builder CPTs included in.
rocket_cpcss_items: https://github.com/wp-media/wp-rocket/blob/master/inc/classes/optimization/CSS/class-critical-css.php#L312
rocket_cpcss_excluded_post_types: https://github.com/wp-media/wp-rocket/blob/master/inc/classes/optimization/CSS/class-critical-css.php#L174
rocket_cpcss_excluded_taxonomies: https://github.com/wp-media/wp-rocket/blob/master/inc/classes/optimization/CSS/class-critical-css.php#L237
Having the same issue!
Describe the bug
Wp Rock specifically look for public post types when generating criticalcss: https://github.com/wp-media/wp-rocket/blob/master/inc/classes/optimization/CSS/class-critical-css.php#L156
Set public to false for templates and blocks so WP rocket doesn't have to try to create criticalcss for something that isn't public for the website users and not in the use of criticalcss.
Does oxygen need to have the CPTs set to public? If so WP rocket have an exclude list we should have oxygen builder CPTs included in.
rocket_cpcss_items: https://github.com/wp-media/wp-rocket/blob/master/inc/classes/optimization/CSS/class-critical-css.php#L312
rocket_cpcss_excluded_post_types: https://github.com/wp-media/wp-rocket/blob/master/inc/classes/optimization/CSS/class-critical-css.php#L174
rocket_cpcss_excluded_taxonomies: https://github.com/wp-media/wp-rocket/blob/master/inc/classes/optimization/CSS/class-critical-css.php#L237