Okay
  Public Ticket #2716310
Custom Post Meta
Closed

Comments

  •  1
    riotctrl started the conversation

    Is there a way for me to tell one of the elements to use the featured image as a background? Also is there a way for any element to use information from custom post meta?

    Right now i have the bg set by choosing it, however i'd love for it to just grab the featured image for the background.

  •  8,403
    Tahir replied

    Hey riotctrl ,

    I am afraid Salient does not have any such options available at the moment.

    Thanks


    ThemeNectar Support Team 

  •  1
    riotctrl replied

    Typically what i would do instead if you dont support this is build the element and then view the page source, then program in code to replace your image with my custom coded image. If you allowed me to edit the module that goes in the row i could program in my featured image on  custom post. Is this possible?

  •  2,723
    Andrew replied

    Hi There,

    We don't recommend editing the core files of the theme, however if you are conversant with what you're doing then you can backup your website before you begin this process.

    Thanks.

  •  8,403
  •  1
    riotctrl replied

    The route i ended up going was using a custom shortcode to get the image url of the featured image and then using a div and setting that div's height to be 80vh and the background image to be the shortcode in an html block. I also set the row to be full width with content. This seemed to have done the trick for me:

    <div style="background-image: url([customdata id=FeaturedImage]); height: 80vh;">

    6262206302.png

    https://www.screencast.com/t/bsKImpcN869

  •  2,723
    Andrew replied

    Hi There,

    We are glad you got a workaround and thanks for sharing this information with us.

    Thanks.