Okay
  Public Ticket #4573906
ACF nutzen
Open

Comments

  • Roland Kosslick started the conversation

    Hallo,

    ich möchte ein ACF-Feld im Slider nutzen und einen post-slider erstellen. ich möchte in der desctop version das post image anzeigen. (das funktioniert schon) nun möchte ich in der handyansicht das ACF als hochkantbild nutzen. Das klappt aber nicht. Ist das überhaupt möglich?

  •  173
    George replied

    Hello Roland,

    A single layer cannot dynamically switch its content based on the device view. For this setup, you’ll need to create a second layer and use device-specific visibility settings for both layers.

    For example, you can keep your current image layer visible on desktop only, then create another layer that is visible on mobile only.

    For the mobile version, please create a dynamic layer and use the ACF field with the post placeholder in the image tag, like this:

    <img src="[meta:fieldname]">

    Please replace fieldname with the actual name of your ACF field.

    Also, please make sure that the ACF field stores the image URL, since LayerSlider needs to use it directly as the image source.

    One more important thing: under the layer’s Styles settings, please set a width for this layer. This is needed so both the slider and the editor can size and display the layer correctly.

    Best Regards,
    George | Kreatura Dev Team