WordPress.org

Ready to get started?Download WordPress

Forums

Background Patterns
[resolved] I can not get the plugin to work 0.2.1. (3 posts)

  1. satet
    Member
    Posted 2 years ago #

    I can select it and save it but it doesn't show.

    http://wordpress.org/extend/plugins/bg-patterns/

  2. shazdeh
    Member
    Plugin Author

    Posted 2 years ago #

    On your website, the body element has inline styling for the background, which replaces the CSS rules that the plugin generates.
    To fix this you must open up your header.php file and remove them.
    Let me know if it worked.

  3. Mateus Neves
    Member
    Posted 2 years ago #

    Shazdeh, you might consider some changes to the "bg-patterns.php" file, just to ensure that the CSS code generated by the plugin will overwrite any other that already exists (any theme or something else).
    Just add "!important" before the end of each declaration:

    before: $style = $color ? "background-color: #$color;" : '';
    after: $style = $color ? "background-color: #$color !important;" : '';

    before: $image = " background-image: url('$background');";
    after: $image = " background-image: url('$background') !important;";

    before: $repeat = " background-repeat: $repeat;";
    after: $repeat = " background-repeat: $repeat !important;";

    before: $position = " background-position: top $position;";
    after: $position = " background-position: top $position !important;";

    before: $attachment = " background-attachment: $attachment;";
    after: $attachment = " background-attachment: $attachment !important;";

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic