[Support request] Hide a block if a post meta is empty

Home Forums Support [Support request] Hide a block if a post meta is empty

Home Forums Support Hide a block if a post meta is empty

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2328599
    twarrior

    Hello,

    We are a creating a Content Template.

    We have a custom post field called “member number”

    we want to display in posts: “Member number: XXXX“.

    “XXXX” is dynamically changed to the value of “member number”.

    BUT…. not all posts have a “member number”.

    so we would like it not to be displayed in those cases. Is it possible?

    thanks

    PS: currently XXXX is not shown, but the “Member number:” text is.

    #2328646
    Ying
    Staff
    Customer Support

    Hi there,

    You are currently using 2 headline blocks, one for the text Member number, the other one for the actually post meta value.

    Can you try using only one headline block and the before text option?
    https://www.screencast.com/t/e6ZTbNb8IOp3

    #2328683
    twarrior

    Thanks, but i would like to format (bold, icon, etc) separately.

    Maybe with genaratebloxks pro?

    #2328725
    Ying
    Staff
    Customer Support

    You can add icons to the headline, but to style them separately is not possible, unfortunately, even with GB pro.

    There’s another workaround is to use Pseudo element CSS, something like this:

    h3.gb-headline.gb-headline-f02c23d4.gb-headline-text:before {
        content: "Member Number: ";
        font-weight: bold;
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.