• japanapproved

    (@japanapproved)


    Hello,

    I have recently started a simple template, followed a 5 min tutorial and am trying to edit the template to my liking…

    I am having a lot of trouble trying to figure out why my background images are not showing up..

    I am not sure if it has to do with the htaccess thing or not, since I found out I had to change the image tags in order for them to show up properly…(I am very new to this all, btw)

    Any help would be appreciated!

Viewing 15 replies - 1 through 15 (of 47 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which theme are you using?

    Thread Starter japanapproved

    (@japanapproved)

    I am using a really simple theme I made using a tutorial:

    https://www.siteground.com/tutorials/wordpress/wordpress_create_theme.htm

    That is the tutorial I used.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What is the URL you’re using to get your background image?

    Thread Starter japanapproved

    (@japanapproved)

    /images/frame.png

    Thread Starter japanapproved

    (@japanapproved)

    /images/frame.png

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are any images that use that directory URL showing?

    Thread Starter japanapproved

    (@japanapproved)

    Yes, the images that i reference like this:

    ‘<img src=”<?php bloginfo(‘template_directory’); ?>/images/kitty.png”/>’

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is your background image using that reference too?
    Instead of the PHP, using text?

    Thread Starter japanapproved

    (@japanapproved)

    I have tried to use it but it doesnt seem to work, and of course php doesnt work in css…so not sure how to get the background of my div to work in any way.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    For the CSS to replicate the template directory, try something like;

    /wp-content/yourThemeName/images/frame.png

    Replace yourThemeName with the actual name of the theme.

    Thread Starter japanapproved

    (@japanapproved)

    So for the CSS I have:
    ‘body {
    text-align: center;
    background-color: cccccc;
    background-image:url(‘/wp-content/renastheme/images/bg.png’);
    }’

    and the same for the div..and its not working, am I doing something wrong?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Oops, forgot to say the themes part, try this;

    /wp-content/themes/renastheme/images/frame.png

    Thread Starter japanapproved

    (@japanapproved)

    If it matters I am using AMPP right now…

    Thread Starter japanapproved

    (@japanapproved)

    still not working

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are there any errors in your browser’s console log?
    You can access Google Chrome’s log through their Inspect Element tool, or use Firefox’s Firebug tool.

Viewing 15 replies - 1 through 15 (of 47 total)
  • The topic ‘Body background image and div background image’ is closed to new replies.