Skip Navigation

[Resolved] css style: shortcode for background image on Bootstrap Profile Cards

This support ticket is created 6 years, 8 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.

This topic contains 1 reply, has 2 voices.

Last updated by Beda 6 years, 8 months ago.

Author
Posts
#892027

Tell us what you are trying to do?
Hi, I'm using Starter Theme
On Category Archive Page hidden link I'm using bootstrap Profile Card code from hidden link

on CSS Line 197 you find:
background: url("hidden link");

How to I have to write the code in order to use my custom post type field "image-main"

I tried multiple combinations with different brackets and quotation marks, but I don't get it working - here was one of my latest tries:

background:url('[types field="image-main" url="true"][/types]');

Is there a similar example that we can see?
hidden link

What is the link to your site?
hidden link

Many thanks for help
best regards,
Georges

#892300

As you know, CSS does not "understand" anything else but CSS.
ShortCodes are not CSS.

You cannot use them to populate CSS rules.

There is one workaround, which is to add the CSS to an HTML editor like in a Content Template, within "style" tags (script for JS).
Then, in there you can populate the CSS with ShortCodes, as they will get executed.

But, please acknowledge that this is neither intended to be done nor supported by either Software like WordPress or frameworks like CSS.

It works, but this does not mean it's "correct".