Title: Child Theme + Custom Fields
Last modified: July 13, 2020

---

# Child Theme + Custom Fields

 *  Resolved [Mykola Pekarskyi](https://wordpress.org/support/users/dizer7/)
 * (@dizer7)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/child-theme-custom-fields/)
 * Hello
    I created custom fields in the ACF plugin and want to display them in 
   a single post. I want to insert the code to display the fields in the child theme.
   I understand I need a file content-helpers.php?
 * Where in the child theme do you need to upload this file? Which folder? What 
   should be the folder hierarchy?
 * /blocksy-child/template-parts/
    /blocksy-child/template-parts/inc/single/ /blocksy-
   child/inc/single
 * How right?
    thank
    -  This topic was modified 5 years, 11 months ago by [Mykola Pekarskyi](https://wordpress.org/support/users/dizer7/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Theme Author [Creative Themes](https://wordpress.org/support/users/creativethemeshq/)
 * (@creativethemeshq)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/child-theme-custom-fields/#post-13124706)
 * Hi!
 * Please check this example: [https://wordpress.org/support/topic/custom-post-template-16/#post-13105316](https://wordpress.org/support/topic/custom-post-template-16/#post-13105316)
   
   It shows how you can override the `single.php` template. Only thing is, you need
   to override `single-movie` from the [code snippet](https://gist.github.com/andreiglingeanu/e298f862fbd93d1d7f610dec5cd118ca)
   with `single`, since you want to change regular posts not custom post types.
 * Please let me know if you still have any problems with this, I’ll be happy to
   help.
 * Best,
    Andrei.
 *  Thread Starter [Mykola Pekarskyi](https://wordpress.org/support/users/dizer7/)
 * (@dizer7)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/child-theme-custom-fields/#post-13127206)
 * Thanks for the answer!
 * But, how to insert custom fields ACF inside this function blocksy_single_content();???
 * I took the code from the file /blocksy/inc/single/content-helpers.php and inserted
   it into the file /blocksy-child/template-parts/single.php, then added custom 
   fields. Data from the custom fields is not displayed.
 * Checked the plugin “Post Meta Inspector” for the presence of fields and content–
   everything is ok.
 *  Theme Author [Creative Themes](https://wordpress.org/support/users/creativethemeshq/)
 * (@creativethemeshq)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/child-theme-custom-fields/#post-13127313)
 * [@dizer7](https://wordpress.org/support/users/dizer7/) Two options here:
 * 1. Override the whole `blocksy_single_content()` function from your child theme,
   since it is declared with `function_exists()`, this is possible.
    2. Let me know
   where exactly (a place in HTML or line of code in PHP) you need to put your ACF
   fields and give me your code snippet that you use and I’ll prepare an action 
   in the theme for you to hook into. I’ll also prepare a code snippet for you with
   this new action.
 * I’d recommend #2.
 * Also, #1 option is bad in a lot of ways — you’ll copy a big chunk of code in 
   your child theme and this can cause issues as new updates from us come in. Effectively,
   you’ll be responsible for maintaining this part of the code. That’s why I recommend
   going with the #2 option.
 * Waiting for your reply.
 * Best,
    Andrei.
 *  Thread Starter [Mykola Pekarskyi](https://wordpress.org/support/users/dizer7/)
 * (@dizer7)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/child-theme-custom-fields/#post-13129602)
 * Here is the file content-helpers.php with my custom fields:
    [https://pastebin.com/hwZ1m1Z4](https://pastebin.com/hwZ1m1Z4)
 * I am ready to use all methods, if only the fields work. The first method isn’t
   bad either. I will compare your code and make the necessary edits to my modified
   file.
 * Thank you so much for your desire to help and advise! Your theme is awesome! 
   I’m switching to it after a paid premium theme.
 *  Theme Author [Creative Themes](https://wordpress.org/support/users/creativethemeshq/)
 * (@creativethemeshq)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/child-theme-custom-fields/#post-13135481)
 * [@dizer7](https://wordpress.org/support/users/dizer7/) you can try to place this
   using this action `blocksy:hero:after`. That is, this code will look like this:
   [https://gist.github.com/andreiglingeanu/a6c0401d5581bbf256839046ee499599](https://gist.github.com/andreiglingeanu/a6c0401d5581bbf256839046ee499599)
 * And no overrides, PROFIT!
 * Thanks for the words and please let me know if this method works better for you.
 * Best,
    Andrei.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Child Theme + Custom Fields’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/blocksy/2.1.44/screenshot.jpg)
 * Blocksy
 * [Support Threads](https://wordpress.org/support/theme/blocksy/)
 * [Active Topics](https://wordpress.org/support/theme/blocksy/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/blocksy/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/blocksy/reviews/)

## Tags

 * [ACF](https://wordpress.org/support/topic-tag/acf/)
 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)

 * 5 replies
 * 2 participants
 * Last reply from: [Creative Themes](https://wordpress.org/support/users/creativethemeshq/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/child-theme-custom-fields/#post-13135481)
 * Status: resolved