Problem:
The issue here is that the user wanted to use custom backgrounds for their posts based on the custom field of the post.
Solution:
This would need some modifications in the theme field to load the background image itself.
You can use an inline style to achieve this.
style="background-image:url('<?php echo do_shortcode("[wpv-post-field id='.$id.' name='background-img' background-size='cover' size='full' url='true']")?>')"
Just ensure that it is using correct field name for the custom field and this should work for you.
So an example usage would be.
<body style="background-image:url('<?php echo do_shortcode("[wpv-post-field id='.$id.' name='background-img' background-size='cover' size='full' url='true']")?>')"> </body>
Where i'm applying the custom background around the body tag.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
This topic contains 17 replies, has 3 voices.
Last updated by 5 years, 9 months ago.
Assisted by: Shane.