Hello,
In a previous project, I have been advised by Tagdiv’s Andrei L that an option can be set to load different background images depending by the page displayed, to be achieved by adding a set of conditions in td_background_render.php file like here:
if (is_page(‘pag-id-1’)){
$this->background_parameters[‘theme_bg_image’] = ‘image-url-for-page-1’;
}
elseif (is_page(‘page-id-2’)){
$this->background_parameters[‘theme_bg_image’] = ‘image-url-for-page-2’;
}
This code will load the background image depending by page id (the page-id has to be replaced with the numeric id of the page, and the image-url with the actual url of the image).
Can you please inform me *where exactly* set of conditions has to be added to td_background_render.php ?
Thanks, and best regards,
PitH
Hi,
The td_background_render.php is set in D:\xamp\htdocs\Newspaper\wp-content\plugins\td-composer\legacy\common\wp_booster\td_background_render.php I think that the code was set at the bottom of the code -> https://i.imgur.com/FD7uyIq.png unfortunately I’m not 100% sure.
Also now in Newspaper 10.3.1 you can use tagDiv Composer an you can set the background image on what element or row you want, also you can use tagDiv Cloud Library for template, if you want you can play with them.
Thank you!
Hello,
Can you please confirm at least that you have received this message? I have the impression that this Forum does not work properly, as reported in my other post: https://forum.tagdiv.com/topic/enable-comments-2/#post-336764 – please try to find a solution that is worthy of a reputable company. Silence may be “gold”, but this is certainly not appropriate for (payable) technical support…
Regards,
PitH
Hello,
>>I think that the code was set at the bottom of the code<<
I added the following code at the bottom of td_background_render.php but this did not work (page-ids & image-urls are ok):
if (is_page(‘6461’)){
$this->background_parameters[‘theme_bg_image’] = ‘https://unser-mitteleuropa.com/wp-content/uploads/2020/03/DE_2.jpg’;
}
elseif (is_page(‘6469’)){
$this->background_parameters[‘theme_bg_image’] = ‘https://unser-mitteleuropa.com/wp-content/uploads/2020/03/AT_1.jpg’;
}
PitH
>>Also now in Newspaper 10.3.1 you can use tagDiv Composer an you can set the background image on what element or row you want<<
TD Composer > Row > General has an entry “Fixed background image” with a checkbox. But how/where can I add the URL for this background image? (Also your online instruction does not provide details.)
PitH
Hi,
For me the reply appear normal -> https://i.imgur.com/H7st1qP.png maybe you have some cache on the browser or some extension, please try to force refresh ctrl+shift_r
Please set the background image for each category like this -> https://i.imgur.com/GEwkyuG.png -> https://i.imgur.com/lBgIz92.png set on each category you want to have the background image, is no need to set it in the code.
Hope this will help you!
Thank you!