WordPress.org

Ready to get started?Download WordPress

Forums

Background images missing (12 posts)

  1. Jac123
    Member
    Posted 2 years ago #

    Hi there,

    There are some background images missing from my site - http://www.test.cwscambodia.org/

    These include:
    -arrows.png (arrows on the right and left of the image slider)
    -sponsor_title.png (behind the the 'our supporters' text) down the bottom of the home page.
    - sponsor_arrows.png on each side of the 'our supporters' images at the bottom of the home page
    - search_bg.png which is background of the search field.

    You can see how these images should look on the theme's test site: http://themes.themolitor.com/wpaid/

    - I have contacted my Host who seems to think it's a database problem in the wp_options table. However, I do not know which area to fix.
    - The theme developer says that the database has nothing to do with the theme so he cannot assist.
    - I have re-installed the theme but have the same issues.
    - I have tried using the original CSS but I still have the same issues.
    - These issues are the same on my local test site so therefore should have nothing to do with hosting. I am using MAMP on my test site.

    I have been trying to solve this issue for about 3 weeks so I would be really grateful if anyone can help me.

    Thank you in advance :)
    Jacqui

  2. home-remedy
    Member
    Posted 2 years ago #

    I just went through it, and it seems like a database problem.

    i don't think we can blame the theme guys for this, as the arrows etc. that you are talking about, is present in the theme. They are just not getting displayed:

    for example:
    test.cwscambodia.org/wp-content/themes/wpaid/images/sponsor_arrows.png

    however, i could not find these image on your blog:
    test.cwscambodia.org/images/indicator.png
    test.cwscambodia.org/images/arrows.png

    So, here is what you can do. Ask your host to fix your database... any decent host would do that.

    Once done, it should get fixed, hopefully,
    keep us updated,

  3. Jac123
    Member
    Posted 2 years ago #

    Hi there, I really appreciate you checking that out for me. Thank you!
    I will contact my host again although they have told me that they weren't sure which line in the database to change and that WP is out of their scope of support. I'll give it another go and see if I can get onto someone who can help.

    I'll keep you posted :)

  4. Jac123
    Member
    Posted 2 years ago #

    Hi again,

    I spoke to the developer and after some investigating they said the following:

    The images that aren't loading are being called from /images/ which doesn't work
    They need to be called from somewhere in /wp-content/
    Otherwise the links break and the items don't load

    Unfortunately, He said he couldn't help me any further than that. I am not sure if anyone can help me further?

    Much appreciated.
    Jacqui

  5. rakesh mohanta
    Member
    Posted 2 years ago #

    Dear jac123
    i checked your website, try this solution for -sponsor_title.png (behind the the 'our supporters' text) down the bottom of the home page.this is the style declaration for sponsors Title ID

    #sponsorsTitle {
    background: url("images/sponsor_title.png") no-repeat scroll 0 0 transparent;
    color: #FFFFFF;
    font-family: sans-serif;
    font-size: 12px;
    font-weight: bold;
    height: 44px;
    left: 50%;
    letter-spacing: 0.7px;
    line-height: 44px;
    margin-left: -80px;
    position: absolute;
    text-align: center;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    top: -11px;
    width: 161px;
    }

    open your style sheet in a text editor named as style.css located at (themes/wpaid/style.css)then go to line 235/236 or search for sponsorsTitle.
    Find this line
    background: url("images/sponsor_title.png") no-repeat scroll 0 0 transparent;
    Here change the background tag to background-image as below

    background-image: url("images/sponsor_title.png") no-repeat scroll 0 0 transparent;

    Hope it work :)

  6. Michael Mann
    Member
    Posted 2 years ago #

    What I've done, as my one site is using a modified version of the twenty eleven theme, to get images to work (ones not declared through an external CSS file), is to add this before the images/whatever.png in img src tags:

    <?php bloginfo('template_directory'); ?>/

    This takes the template directory and puts it in front of the image so that it pulls from the right location.

    HTH

  7. Jac123
    Member
    Posted 2 years ago #

    Hi Rakesh Mohanta, thank you so much for having a look for me. I really appreciate it. Unfortunately, that didn't work. I tried it in my test site (through the style sheet as well as the custom css in the dashboard) and the live site as well.

    There is no ; or : needed apart from after transparent?

    Thank you :)
    Jacqui

  8. Jac123
    Member
    Posted 2 years ago #

    Hi Manndtp, many thanks for the tip! Would you mind elaborating on this a little? Unfortunately I'm far from an expert but I would love to sort this issue out..

    Thanks :)

  9. Michael Mann
    Member
    Posted 2 years ago #

    @jac123 Sure. I have a wordpress site that I blended in a template I had been using pre-wordpress with the Twenty Eleven theme. Rather than trying to figure how to customize the twenty eleven layout to work with my template, I plopped my head section from my template right inside the header.php file. My images would not work, as they were all setup as images/image.png, which was of course looking for the images outside the wp-content folder. So I searched around and found that function I posted above. So I went from this:

    <img src="images/image.png" />

    To this:

    <img src="<?php bloginfo('template_directory'); ?>/images/images.png" />

    Adding in that little bit of PHP with the bloginfo function, the template directory was "pulled in" and the images started to be looked for inside the images folder within the template.

    Hope that helps!

  10. Mike Little
    Member
    Posted 2 years ago #

    Hi Jac123,

    Your problem is that you have a complete copy of your style sheet in your header.

    The style sheet references those background images relative to it's own location, (which is correct), but when you copy those styles into your header, the images are not relative to the style's location.

    I presume you have either copied the stylesheet into a screen in the theme options page that allow you to tweak the styles, or you are using something like Automattic's custom css plugin.

    Try either turning the custom css plugin off, or removing the styles you have added to your theme's set up page. That should fix your immediate problem.

    However, that may undo some of the style tweaks you wanted to achieve.

    It is important to know that in order to tweak the theme's style, you only need to add the bits you want to change, not a copy of the whole thing.

  11. Jac123
    Member
    Posted 2 years ago #

    Mike, thank you! I can't believe it was that simple! I'll think i'll just stick to editing the theme in the styles.css or like you said just adding the bits I want to change in the theme setup/dashboard (still have some tweaking to do). I have been trying to sort out this for so long and have spent so many hours on forums/talking to host etc... really appreciate your help! Is there anyway to give you stars or something? Virtual high five!?!

    Many thanks also Manndtp for all your help, I'll definitely keep that in mind for further issues.

    Have a great weekend all :)

    Jacqui

  12. Mike Little
    Member
    Posted 2 years ago #

    No problems. You've already thanked me. That's enough.

    Don't forget to mark the issue as resolved on the right hand sidebar.

Topic Closed

This topic has been closed to new replies.

About this Topic