Quantcast
Viewing all articles
Browse latest Browse all 8245

rioforce on "Use get_background_image in src"

Hi, I have an image tag in the header.php file in my Wordpress child theme. I want to use the wordpress background image defined in the Admin panel as the img src.

I found where you can call the background image from PHP, but I put it in the quotes in the src, but that will not put the image there. It leaves the img src blank when I view source in Firefox.

https://codex.wordpress.org/Function_Reference/get_background_image

Basically, this is the code I wrote that did not work:

<img id="parallaxContainer" src="<?php get_background_image(); ?>" />

What am I doing wrong?

Thanks for the help! :D


Viewing all articles
Browse latest Browse all 8245

Trending Articles