Agency Pro – background problem

Community Forums Forums General Discussion Agency Pro – background problem

This topic is: resolved

This topic contains 18 replies, has 3 voices, and was last updated by  kiralytool 8 months, 2 weeks ago.

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #85950

    garnetta
    Participant
    Post count: 19

    I created a custom background 100 px wide x 1500 px tall and want it to tile horizontally for my background in Agency Pro. It’s not tiling properly. Instead it’s stretching a small portion to fill the screen cutting off the top of the image. I’ve selected “tile horizontal” in the custom background settings page.

    ????????

    #85953

    AC
    Blocked
    Post count: 7712

    Agency Pro uses Backstretch. If you want to use the image you have designed that instead, you will need to remove the backstretch code from the theme.

    #85958

    garnetta
    Participant
    Post count: 19

    Where is the backstretch code?

    #85960

    AC
    Blocked
    Post count: 7712

    It’s located in your Functions.php file.

    #85965

    garnetta
    Participant
    Post count: 19

    I removed the code and it no longer displays a custom background image. This is what I removed from the Functions.php:

    //* Enqueue Backstretch script and prepare images for loading
    add_action( ‘wp_enqueue_scripts’, ‘agency_enqueue_backstretch_scripts’ );
    function agency_enqueue_backstretch_scripts() {

    //* Load scripts only if custom background is being used
    if ( ! get_background_image() )
    return;

    wp_enqueue_script( ‘agency-pro-backstretch’, get_bloginfo( ‘stylesheet_directory’ ) . ‘/js/backstretch.js’, array( ‘jquery’ ), ‘1.0.0’ );
    wp_enqueue_script( ‘agency-pro-backstretch-set’, get_bloginfo( ‘stylesheet_directory’ ).’/js/backstretch-set.js’ , array( ‘jquery’, ‘agency-pro-backstretch’ ), ‘1.0.0’ );

    wp_localize_script( ‘agency-pro-backstretch-set’, ‘BackStretchImg’, array( ‘src’ => str_replace( ‘http:’, ”, get_background_image() ) ) );

    }

    #85966

    AC
    Blocked
    Post count: 7712

    Ok, were you able to add your own image now?

    #85967

    garnetta
    Participant
    Post count: 19

    I can add the custom image and it shows it in the custom background settings page, but when I save it and view the page it’s not there.

    #85970

    AC
    Blocked
    Post count: 7712

    Please share a link to the site so I can take a look.

    #85971

    garnetta
    Participant
    Post count: 19

    http://palspetcremationsedalia.com/pets

    There’s not much there because I just got started. :)

    #85973

    AC
    Blocked
    Post count: 7712

    Can you give me a screenshot of the Appearance > Background page in your dashboard?

    #85974

    garnetta
    Participant
    Post count: 19

    You can see the screenshot here: http://palspetcremationsedalia.com/example.jpg

    • This reply was modified 11 months ago by  garnetta.
    • This reply was modified 11 months ago by  garnetta.
    #85976

    AC
    Blocked
    Post count: 7712

    Did you have that there before you removed the code or did you add it after you removed it?

    #85977

    garnetta
    Participant
    Post count: 19

    I re-added it after I removed the code.

    #85978

    AC
    Blocked
    Post count: 7712

    Look in your Functions file and see if you have code related to this. If you do, copy and paste it over here.

    add theme support for custom background

    #85979

    garnetta
    Participant
    Post count: 19

    This code is still in my Functions file:

    //* Add support for custom background
    add_theme_support( ‘custom-background’, array( ‘wp-head-callback’ => ‘agency_background_callback’ ) );

    //* Add custom background callback for background color
    function agency_background_callback() {

    if ( ! get_background_color() )
    return;

    printf( ‘<style>body { background-color: #%s; }</style>’ . “\n”, get_background_color() );

    }

Viewing 15 posts - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.