Skip Navigation

[Resolved] View: Background Image with Custom Fields over it

This support ticket is created 7 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by Luo Yang 7 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#449377
6dd61fb6ae910c4c7a646385fd0f9ec4.png

Hi there,

I have a very challenging view that I'm trying to achieve.

I have a custom post type called "Project"
this custom post type has 3 custom fields assigned to it.

1. Custom field image "Project Background Image"
2. Custom field text "Project Headline"
3. Custom field text "Project Subtitle"

for single posts of my custom post type, I want to achieve the same look in the frontend as shown in the attached pic.

Is it doable through Toolset and how can I do it?

Kind Regards,
Bassem

#449627

Dear Bassem,

Yes, it is possible within Toolset, see below test site:
hidden link
user/pass: xgren/111111

Use below content template:
hidden link
codes:

<div class="my-banner" style="background-image:url([types field='project-background-image' size='large' url='true'][/types]);">
  <h2>[types field='project-headline'][/types]</h2>
  <h5>[types field='project-subtitle'][/types]</h5>
</div>
#449788

Impressive! Thanks a lot Luo 🙂
that was really easy.

Best,
Bassem

#449900

But how can I make the image full width similar to the attached pic in the very first beginning of this thread?

#449995

This is a CSS question, you can modify the parameters of the background, for example:

<div class="my-banner" style="background:url([types field='project-background-image' size='large' url='true'][/types]) no-repeat center center;">
  <h2>[types field='project-headline'][/types]</h2>
  <h5>[types field='project-subtitle'][/types]</h5>
</div>

And it is only an example, you will need to customize the CSS codes as what you want.

More help:
hidden link
hidden link

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.