S
S
Stanislav_Bykov2018-02-05 15:55:06
css
Stanislav_Bykov, 2018-02-05 15:55:06

How to set an image as background in wordpress?

Good afternoon!
I just started to learn Wordpress, or rather landing a made-up website on Wordpress, and I ran into a problem - how to dynamically set the path to the file (block background) in the style file (style.css) that is located on the same server? All pictures are inserted as the background of the block and I would not want to prescribe a direct path, because when changing the domain, all paths will have to be redone.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladislav Lyskov, 2018-02-05
@Stanislav_Bykov

then like this /wp-content/themes/_theme_/_folder_/_image_

D
Denis Slavsky, 2018-02-05
@SlavskiyDenis

background: url(folder/image);

G
Glorious Cat, 2018-02-05
@tansur

You need to specify relative paths to the files. Read .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question