Skip to content

Widgets without titles do not inherit the .panel-body markup #181

Description

@atcraigwatson

When adding a widget that does not have a default title, the HTML markup for .panel-body is not used.

This is because the opening tag for .panel-body is appended to the end of the 'after_title' argument as part of the 'genesis_register_sidebar_defaults' filter arguments.

Fixes?

Conditionally add the .panel-body to the 'before_widget' argument if no title is present. If the title is present then the markup is fine as it stands.

This method would also remove the need for the following code from widget.scss

    // Handle the missing padding from .panel-body when no widget title is used
    > .search-form {
        padding: 10px 15px;
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions