Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I output a text field in my template? #47

Open
nreck opened this issue May 7, 2018 · 4 comments
Open

How do I output a text field in my template? #47

nreck opened this issue May 7, 2018 · 4 comments

Comments

@nreck
Copy link

nreck commented May 7, 2018

I've created a new GCF template and added the text field large_title. Now I want to create a custom post page, where I can choose where to output the large_title text.

I've tried with get_post_meta( $frontpage, $large_title ); - frontpage being the title of the template in GCF, but that didn't work. I've also tried some other combinations. How do I do this?

@youknowriad
Copy link
Owner

Did you try? get_post_meta( $frontpage, 'large_title' );

@bahiirwa
Copy link

bahiirwa commented May 24, 2018

This was a similar question on my mind. Is a code sample in the docs possible?

@youknowriad
Copy link
Owner

Each field has an associated code example in the docs see https://youknowriad.github.io/gcf/#/fields/text

@mariapaz
Copy link

mariapaz commented Jan 6, 2019

This worked for me echo get_post_meta( get_the_ID(), 'name_of_the_field', true )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants