GetSimple Support Forum

Full Version: How to set background image for a specific article
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to put a logo as a background picture in "About Us" page. The logo always shows as a picture and not as a background picture. Anyone tried to do that?
(2017-05-24, 08:37:21)omrseo Wrote: [ -> ]I'm trying to put a logo as a background picture in "About Us" page. The logo always shows as a picture and not as a background picture. Anyone tried to do that?

Code:
<style>
if(get_page_slug($echo=false) == 'about-us') {
echo 'body {background-image:url(PATH/TO/background.jpg)}';
}
</style>

Alex
You have to set the background picture in your theme instead of your page. If it is only suposed to be active on one page, you can make a seperate template file, in the page edit screen you can set a different template per page.

There are other ways (custom field/component etc.), but this is the standard way I think.