WordPress.org

Ready to get started?Download WordPress

Forums

Gecka BgStretcher
[resolved] No background setting/function under Appearance menu (21 posts)

  1. Jason Lasky
    Member
    Posted 3 years ago #

    I'm using Suffusion which does not create Background function under Appearance.
    It seems the plug-in does not handle themes without that function already in place?

  2. Gecka
    Member
    Plugin Author

    Posted 3 years ago #

    Hello yehoshanah,

    Yes it does, you should have read the doc

    Just add to your theme's functions.php the following:

    add_streched_background ('background=http://path-your-image')

    Greetings

  3. lewisx
    Member
    Posted 3 years ago #

    I am having an issue with this as well...

    In the theme I use, there is no background function under appearance.

    Can this be implemented without that background function under appearance?

    Thank you

  4. Gecka
    Member
    Plugin Author

    Posted 3 years ago #

    Hello,

    As I already wrote, you have to add

    add_streched_background ('background=http://path-your-image')

    to your theme's functions.php file and your done. (replace http://path-your-image with the path to your background image)

    Regards

  5. lewisx
    Member
    Posted 3 years ago #

    Thank you for such a fast response, and fantastic plugin, BTW.

    I forgot to include a semi-colon to close the statement.
    Your example should read:

    add_streched_background ('background=http://path-your-image');

    Interesting now though, the stretched BG covers the other style areas of my style sheet.

    Can you think of anything that may be causing this?

  6. Gecka
    Member
    Plugin Author

    Posted 3 years ago #

    For the background image not to cover your content you HAVE to wrap your content in a div, give it an ID, and tell the plugin witch is the wrapper.

    example:

    <body>
    <div id="wrapper">
    /* your page content*/
    </div>
    </body>

    If you use wrapper as the id, nothing else is needed., If not, tell the plugin about the wrapper ID (see the pageWrapper property here: http://gecka-apps.com/documentation/bgstretcher/)

    Note that some mandatory CSS rules will get applied to the wrapper (again see http://gecka-apps.com/documentation/bgstretcher/)

  7. MisterA
    Member
    Posted 3 years ago #

    Great Plugin! thanks. but how exactly insert an array of background? I didn't find the right solution also on the doc.
    is it like this in function.php:
    [add_stretched_background("background=Path to first image, path to second image");] ??
    Thanks for your help.

  8. Gecka
    Member
    Plugin Author

    Posted 3 years ago #

    Hello,

    First you must know that the add_stretched_background function, like every other WordPress function, accepts its options as a query_string ("key=val&key2=val") or as an array ( array('key'=>'val', 'key2'=>val) )

    The documentation says, for the background option: "The background image to show, or an array of background images as full url."

    So if you want to give multiple background images to the function, you would do this:

    add_stretched_background( array('background' => array('http://image1', 'http://image2', 'http://image3') );

    Regards

  9. Hubrecht
    Member
    Posted 3 years ago #

    Love this plugin! Works fine now! Struggling with two things though.

    I'm trying to add multiple background images for a 'background slideshow', but the code I put in the functions.php
    add_streched_background ('http://image1');
    doesn't seem to overrule the background I selected in the 'WordPress Appearance -> Background' section.

    And if I try the code (after changing the image URLs of course)
    add_stretched_background( array('background' => array('http://image1', 'http://image2', 'http://image3') );
    it gives an parse error: syntax error, unexpected ';'.

    How to get this working?

    Thanks!

  10. Laurent J.V. Dubois
    Member
    Posted 3 years ago #

    @ Hubrecht
    test without typo error and same opened and closed (), copy and past that :
    add_streched_background( array('background' => array('http://image1', 'http://image2', 'http://image3')));

    That works fine here : http://www.psychotherapie-gestalt.com/

  11. Hubrecht
    Member
    Posted 3 years ago #

    @ljvd, you're the man! I copy pasted the code from Gecka a couple of replies ago so I supposed it would be ok, but this makes total sense. Works now!

  12. ale_ba
    Member
    Posted 3 years ago #

    Hi Gecka
    Sorry but i don't understand where i have to wrap in div my contenent.
    in witch file?

    I use a Basico theme

    thank's

  13. Gecka
    Member
    Plugin Author

    Posted 3 years ago #

    Hi ale_ba

    In header.php add <div id="wrapper"> after the <body> tag

    In footer.php add </div> before the </body> tag

  14. ale_ba
    Member
    Posted 3 years ago #

    Hi Gecka.
    in the header php file i add <div id="wrapper"> after >body> tag and
    </div> in the fooet.php before the </body> tag but the image not appear streeced.

    in the function.php file I add:

    add_streched_background ('background=http://www.informale.isgreat.org/wp-content/uploads/2011/03/SarmedePueblo.jpg')

    do you know why?

    thank's

  15. Gecka
    Member
    Plugin Author

    Posted 3 years ago #

    Hi ale_ba,

    What do you mean by "the image not appear streeced" ?

    Regards.

  16. ale_ba
    Member
    Posted 3 years ago #

    Hi Gecka.
    sorry "stretch";
    i mean that the image not fill the screen size.
    please look at http://www.informale.isgreat.org/

    than you

  17. Gecka
    Member
    Plugin Author

    Posted 3 years ago #

    It seems like you do not call the add_streched_background function in your theme's functions.php file.

    Please make sure you do. If so, send us you functions.php file using our support form: http://gecka-apps.com/support

  18. ale_ba
    Member
    Posted 3 years ago #

    Yes, sorry, I comment this function otherwise nothing can load (even wp-admin) and a blank page is show.

  19. raffe
    Member
    Posted 3 years ago #

    Hello,

    I've installed bgStretcher on two different WP-installations and updated them both to 3.1.2 just today. Then I installed bgStretcher on both, added the string in function.php on both BUT the menu value "Background" under "Appearance" does only show under one of the installations.

    Then I tried to copy/paste the url for the plugin from the site with Background, but got permissions problems on the one without Background.

    Now what?

  20. Gecka
    Member
    Plugin Author

    Posted 3 years ago #

    You should have read the FAQ of the documentation: http://gecka-apps.com/documentation/bgstretcher/

  21. flashcrazy
    Member
    Posted 2 years ago #

    Hi Everyone!
    This thread has been extremely helpful... I had initially used css3 to achieve the background image stretch but obviously ran into problems when using heavily utilized older browsers like ie8... So I used the Gecka Bgstretcher plugin to over come these obstacles... The problem that i'm having is when I use the Android Smart Phone Browser to view the website the background is not covering 20px of space? Any idea on how to fix this, if you could write the code that would be really helpful!
    Thanks so much!
    thesportshubboston.com

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic