Skip to content
Advertisement

Customizer Object Header Background image issue (HTML to WordPress)

i’m trying to convert html template into wordpress with more easy to edit, for this i do try to add front page header slider images and content into customizer object. Like easy to edit for users. user can go to Appearance>>customize>>Home Page hader>> and then there he/she can choose image for slider background and content also, everything works fine for me but background image doesn’t work for me , query returns some digit like 11 or 16 but it should return image URL. HTML TEMPLATE: https://www.free-css.com/free-css-templates/page262/cron Code shows below

into functions.php

JavaScript

into front-page.php

JavaScript

Output: background-image:url(11) i do check it in inspect, it is suppose to be url like wp-content/images/banner.png etc

Advertisement

Answer

it works for me using

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement