- Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236
annulixi
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220Hey,
I am using Enlightenment theme for my project and I can’t figure out how to display custom fields that I have created for a Post? I am using a child theme for all my changes. I know what line in enlightenment/core/content.php I have to modify in order to display custom fields in the place I want. But as I can’t modify it right in enlightenment theme due to updates, I’d like to add this file to my child theme and modify it there. But I don’t know how to make it work. Could you help me please?
It’s not working when I just copy /core/content.php into my child theme and modify it there.Cheers
AdvertismentDeprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236Daniel Tara
KeymasterWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220The best way to do this is to create a shortcode that displays that custom field. This way you can control where the field appears in the content. See the Shortcode API documentation.
If you don’t want to use a shortcode then you can use
'the_content'
filter to append the field to the post content.
Tagged: Custom Fields
You must be logged in to reply to this topic.