Home Forums General Issues Adding images to sidebars


Adding images to sidebars

  • Hi, I’m trying to add an image as a background to a sidebar. This is a site that was developed for my organization by a development firm, who added the Advanced Custom Fields for various functions. The problem is, I was given the reigns without any training and I’m not a developer!

    Anyway, I needed to create a new sidebar and by reading various threads and mimicking the existing ones, I was able to create a new sidebar by adding php code to the sidebar.php file. I also found the style code in the style.css file with colors, fonts and a background link to an image. Again, I copied the code of an existing sidebar, made a few changes and voila! It appeared on the front end. (I was pretty excited when this happened! 🙂

    BUT, now I need to replace the image of the sidebar that I was using as a guide with the actual image that I am using for this sidebar. I uploaded it to the Media library, copied the url and replaced it in the stylesheet. It did not work. The sidebar is now blank. Can anyone guide me as to what I’m doing wrong? Is there a step that I missed??

    Here’s a bit of the code from the sidebar that I used as a guide within the stylesheet

    .forms-widget {
    width: 223px;
    height: 225px;
    background: url(‘./images/formswidget-bg.png’) no-repeat;
    border: 1px solid #acacac;
    color: #fff;

    Here’s what I created:

    .news-widget {
    width: 223px;
    height: 342px;
    background: url(‘./images/news-graphic.png’) no-repeat;
    border: 1px solid #acacac;
    color: #fff;

Viewing 1 post (of 1 total)

The topic ‘Adding images to sidebars’ is closed to new replies.