1

What can I do in order to add an ACF textarea into a Genesis child theme template.

I tried a lot but did not find any way.

Thank you.

Devin
  • 7,690
  • 6
  • 39
  • 54
fysalyaqoob
  • 71
  • 2
  • 9
  • 1
    OK, you tried a lot, please tell us what you tried with samples of code so we can see what are you doing and how we can help you – Devin Sep 28 '14 at 22:28

1 Answers1

1

First you have to figure out where you want to put the field. You can either use one of the genesis hooks (see here) or perhaps your modifying a theme field directly in which case you can just paste the code whereever you want.

For example if you're using a hook and you want to put it in your header, you could do something like:

add_action('genesis_header', 'add_content_to_header');
function add_content_to_header() {
    echo get_field('my_textarea_field');';
}

Or do put it directly into a child theme template file, just put this whereever you want:

the_field('my_textarea_field');';
manishie
  • 5,302
  • 1
  • 20
  • 21
  • Thank you help but i have already sort out how to do this but now i am facing a new problem. How i can put shortcode using advance custom field's field – fysalyaqoob Sep 29 '14 at 03:32
  • Sorry I'm not sure what you're asking. Does the custom field contain a shortcode? And you want to run whatever shortcode is in that field? If so you would just use echo do_shortcode( get_field('my_textarea_field') ) – manishie Sep 29 '14 at 03:44