Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

How can I display a “label” above my email?

  • Hello, can you help me. How can I show a “label” above my email, but only when the specific field is filled out. I am using the dynamic features of generate block (capture attached) and the META fields, which I inject with ACF fields. Is it possible to do it from Generate block, is this option?
    I would like to put, for example “contact detail:” THANK
    https://ibb.co/cXNJGBY

  • Hi there,

    I’m not quite sure what you mean by ‘label’. Do you have any examples that show what you’re trying to achieve?

    I tried looking at your site, but it’s password protected.

  • sorry, I already deactivated the password. What I want to achieve is something like this so that the descriptive label appears on the email, for example. This example (capture) is built with CSS before, but I don’t think it is the best strategy, could it be achieved in another way with the ACF fields from the generate block? or from ACF it would work for me too. thank you

    https://ibb.co/0n1NVVX

  • You can use a separate Headline block to display the label.

  • Yes, but if the field in question is not filled in, said label will continue to appear, and I wanted to know if in generateblock there is any type of conditional or strategy for displaying this block. If I don’t create it with the acf filters, I can achieve it, but I was wondering if I could achieve something like that from the plugin.

    <p><strong>Email:</strong> <?php the_field('email'); ?></p>

  • You should be able to use CSS to hide the other headline.

    Can you show me a page that the email is not filled in, but the label still exists so I can seek for a CSS solution?

    Or you can create a shortcode for it, and use the shortcode instead.

    Let me know 🙂

  • Hello, with CSS I think I could solve it, but it was to find out if genertateblock had any similar characteristics, anyway, thank you for your interest

  • If you are in a GP element, you can use the container condition.

    So wrap the label and the link with a container, set the container to hide when certain post meta isn’t filled.

    But if you are in a page editor, you will need to use CSS or custom PHP code to alter the block content.

  • ok, thanks I’ll try that option

  • You are welcome   🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.