
Not sure if this is possible, but I haven't found a way of doing it?
I'd like to be able to set the background image URL as php, for example to give a Layout Container or Section the background of a post's featured image. Eg, select the url option for background and then insert the following code, instead of a url:
<?php echo="" wp_get_attachment_url(="" get_post_thumbnail_id()="" );?=""?>
(This php won't format properly in this post for some reason, sorry)
The main reason I want this is so I can then apply the parallax extension to the container of section and use it as a post header. I also want to be able to place things like the post title inside this container, so a CMS code snippet containing a div (which is my current attempt) is no good.
This is what I have in a CMS code snippet at the moment, but it solves neither of the problems above:
<div style="
background-image:url('<?php echo wp_get_attachment_url( get_post_thumbnail_id() );?>');
height:200px;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;"></div>
Can you give me a solution for this? Or if totally not possible, consider including it somehow in future releases?
Not sure if this is possible, but I haven't found a way of doing it? I'd like to be able to set the background image URL as php, for example to give a Layout Container or Section the background of a post's featured image. Eg, select the url option for background and then insert the following code, instead of a url: <?php echo="" wp_get_attachment_url(="" get_post_thumbnail_id()="" );?=""?> (This php won't format properly in this post for some reason, sorry) The main reason I want this is so I can then apply the parallax extension to the container of section and use it as a post header. I also want to be able to place things like the post title inside this container, so a CMS code snippet containing a div (which is my current attempt) is no good. This is what I have in a CMS code snippet at the moment, but it solves neither of the problems above: <div style=" background-image:url('<?php echo wp_get_attachment_url( get_post_thumbnail_id() );?>'); height:200px; background-position: center; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;"></div> Can you give me a solution for this? Or if totally not possible, consider including it somehow in future releases?Last edited 27 January 2016 by jamesgander