Elementor 开发者文档

title: "Content Width" post_status: publish comment_status: open taxonomy: category: - elementor-developers-docs post_tag: - Hello Elementor Theme - Src - Repos


Content Width

The theme sets content width of 800 pixels. Developers can override this using a filter hook in a child-theme.

Hook Details

The hook modifies the default content width set by the theme. By default it's set to 800 pixels, however developers can set different widths.

Usage

To set custom content width, use the following hook in a child-theme functions.php file:

function custom_hello_elementor_content_width() {
    return 1024;
}
add_filter( 'hello_elementor_content_width', 'custom_hello_elementor_content_width' );