Site logo

[Resolved] How To Use Two Custom Fields In 1 Line of Text In Template Element

Home Forums Support [Resolved] How To Use Two Custom Fields In 1 Line of Text In Template Element

Home Forums Support How To Use Two Custom Fields In 1 Line of Text In Template Element

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2120503
    Brent Wilson

    How can I pull content from two different custom fields and combine it into one line of text (this is for a content template element)? For example, if I have a custom field for First_Name and a custom field for Last_Name, how can I display those as First_Name Last_Name centered in the template?

    #2120534
    Elvin
    Staff
    Customer Support

    Hi Brent,

    If you can display the custom fields values from a shortcode(if you’re using ACF, it has one), you can place 2 shortcodes for each of the field inside 1 GB Headline block. Like this – https://share.getcloudapp.com/wbuYgB8y

    Alternatively, you can have them on their own GB headline block and have both these block display in an inline manner.

    You can set them to “inline width” by toggling it on their Spacing setting as shown here – https://share.getcloudapp.com/jkumk8m4

    #2120539
    Brent Wilson

    Great. Thank you! I am using Metabox and was able to get a couple of shortcodes to work to allow me to combine first and last name custom fields.

    #2120552
    Elvin
    Staff
    Customer Support

    Thanks for letting us know. glad you got it sorted. 😀

    Let us know if you need further help .:D

    #2491683
    Alexander

    Hi Elvin,

    Unfortunately, your getcloudapp.com link is not valid any longer. Can you post the solution again here?

    Thanks!

    #2491824
    Ying
    Staff
    Customer Support

    Hi Alexander,

    If you are trying to use the GB headline block to pull the dynamic data, you can set the headline block to inline width:
    https://docs.generateblocks.com/article/headline-overview/#inline-width

    If if doesn’t work, can you open a new topic? Thanks!

    #2492583
    Alexander

    That worked perfectly, thanks!

    #2493321
    Ying
    Staff
    Customer Support

    No Problem, glad to help 🙂

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